Convert beginning a way to a specific (therefore detectable) CUA class
authorAndy Allan <gravitystorm@gmail.com>
Wed, 25 Aug 2010 13:35:40 +0000 (13:35 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Wed, 25 Aug 2010 13:35:40 +0000 (13:35 +0000)
net/systemeD/halcyon/connection/actions/BeginWayAction.as [new file with mode: 0644]
net/systemeD/potlatch2/controller/NoSelection.as

diff --git a/net/systemeD/halcyon/connection/actions/BeginWayAction.as b/net/systemeD/halcyon/connection/actions/BeginWayAction.as
new file mode 100644 (file)
index 0000000..293e744
--- /dev/null
@@ -0,0 +1,13 @@
+package net.systemeD.halcyon.connection.actions {
+
+    import net.systemeD.halcyon.connection.*;
+
+    /* This is needed so that the specific type of CUA can be detected when CreatePOIAction is called */
+    public class BeginWayAction extends CompositeUndoableAction {
+
+        public function BeginWayAction(){
+          super("Begin Way Action");
+        }
+
+    }
+}
\ No newline at end of file
index aa12eab..dcbdf85 100644 (file)
@@ -3,6 +3,7 @@ package net.systemeD.potlatch2.controller {
        import flash.display.*;
        import net.systemeD.potlatch2.EditController;
        import net.systemeD.halcyon.connection.*;
+    import net.systemeD.halcyon.connection.actions.*;
        import net.systemeD.halcyon.Map;
        import net.systemeD.halcyon.MapPaint;
        import net.systemeD.halcyon.Globals;
@@ -21,7 +22,7 @@ package net.systemeD.potlatch2.controller {
 
                        if (event.type==MouseEvent.MOUSE_UP && focus==null && map.dragstate!=map.DRAGGING) {
                                map.dragstate=map.NOT_DRAGGING;
-                               var undo:CompositeUndoableAction = new CompositeUndoableAction("Begin way");
+                               var undo:CompositeUndoableAction = new BeginWayAction();
                                var startNode:Node = controller.connection.createNode(
                                        {}, 
                                        controller.map.coord2lat(event.localY),