== 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
== 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
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">
<mx:ArrayCollection id="changesetTags">
<mx:Object k="created_by" v="Potlatch 2"/>
- <mx:Object k="version" v="x.xx.x"/>
+ <mx:Object k="version" v="{Application.application.version}"/>
<mx:Object k="comment" v=""/>
</mx:ArrayCollection>
</mx:text>
</mx:Text>
<mx:Label text="Comment:"/>
- <mx:TextArea id="comment" width="100%" height="100%"/>
+ <mx:TextArea id="comment" width="100%" height="100%" change="commentChanged(event);" />
</mx:VBox>
<mx:VBox width="100%" height="100%" label="Advanced">
<mx:Label text="Changeset tags:"/>
- <mx:DataGrid editable="true" width="100%" height="100%" id="advancedTagGrid"
+ <mx:DataGrid editable="true" width="100%" id="advancedTagGrid"
dataProvider="{changesetTags}">
<mx:columns>
<mx:DataGridColumn editable="true" dataField="k" headerText="Key"/>
<mx:DataGridColumn editable="true" dataField="v" headerText="Value"/>
</mx:columns>
</mx:DataGrid>
+ <mx:HBox horizontalAlign="right" width="100%">
+ <mx:LinkButton label="Delete" click="removeTag()" enabled="{advancedTagGrid.selectedItem != null? true : false}"/>
+ <mx:LinkButton label="Add" click="addNewTag()"/>
+ </mx:HBox>
+ <mx:HRule width="100%" />
</mx:VBox>
</mx:ViewStack>
<mx:LinkBar dataProvider="{tagStack}"/>
import mx.controls.*;
import mx.managers.PopUpManager;
+ import mx.core.Application;
import net.systemeD.halcyon.connection.*;
[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 {
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+")");