From 97c2afdf0f23dd790db7e318e25f702d48cff018 Mon Sep 17 00:00:00 2001 From: Richard Fairhurst Date: Mon, 14 Jun 2010 11:44:10 +0000 Subject: [PATCH] fix save dialogue --- TODO.txt | 2 +- net/systemeD/potlatch2/save/SaveDialog.mxml | 32 +++++++++++++++++---- potlatch2.mxml | 2 ++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/TODO.txt b/TODO.txt index fe2c1626..c9ca1795 100644 --- a/TODO.txt +++ b/TODO.txt @@ -5,6 +5,7 @@ Potlatch 2: main outstanding issues == Core geometry == ** Straighten way + undo + redo looks fine in the UI, but doesn't reinsert the nodes into the way properly when saving (maybe way isn't dirty?) +* Dragging multipolygons (or constituent nodes) doesn't force redraw of all ways - need to hook something up to WAY_NODE_MOVED * Make parallelise properly undoable * Make Quadralatalawhatsit properly undoable * Splitway + undo leaves way marked dirty @@ -22,7 +23,6 @@ Potlatch 2: main outstanding issues == Saving == -** Comment and advanced -> "comment" should show the same thing * Save should be deactivated until there's things to change * Should be able to reuse changesets * Shouldn't be able to change created_by and version on changeset diff --git a/net/systemeD/potlatch2/save/SaveDialog.mxml b/net/systemeD/potlatch2/save/SaveDialog.mxml index 5fb732d8..a3fa522e 100644 --- a/net/systemeD/potlatch2/save/SaveDialog.mxml +++ b/net/systemeD/potlatch2/save/SaveDialog.mxml @@ -3,11 +3,11 @@ xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" horizontalAlign="center" title="Save Changes" - width="350" height="250" verticalGap="0"> + width="350" height="330" verticalGap="0"> - + @@ -24,18 +24,23 @@ - + - + + + + + @@ -69,6 +74,7 @@ import mx.controls.*; import mx.managers.PopUpManager; + import mx.core.Application; import net.systemeD.halcyon.connection.*; @@ -76,6 +82,22 @@ [Bindable] private var failureText:String = ""; + + private function commentChanged(event:Event):void { + for (var i:int=changesetTags.length-1; i>0; i--) { + if (changesetTags[i]['k']=='comment') { changesetTags.removeItemAt(i); } + } + changesetTags.addItem( { k:'comment', v: event.target.text } ); + } + + private function addNewTag():void { + changesetTags.addItem( { k:'(new key)', v:'(new value)' } ); + advancedTagGrid.editedItemPosition = { rowIndex: changesetTags.length-1, columnIndex: 0 }; + } + + private function removeTag():void { + changesetTags.removeItemAt(advancedTagGrid.selectedIndex); + } private function startSave():void { @@ -93,7 +115,7 @@ conn.addEventListener(Connection.NEW_CHANGESET_ERROR, changesetError); conn.createChangeset(tags); } - + private function changesetCreated(event:EntityEvent):void { var changeset:Changeset = conn.getActiveChangeset(); addStatus("Changeset created (id: "+changeset.id+")"); diff --git a/potlatch2.mxml b/potlatch2.mxml index b37f77ff..521aebbb 100755 --- a/potlatch2.mxml +++ b/potlatch2.mxml @@ -141,6 +141,8 @@ private var savecount:uint=0; private var loadcount:uint=0; + + public var version:String="(Foxbase) Alpha"; // mxml won't read it if it's a const. Go figure private function initApp():void { -- 2.30.0