remove the [_] junction box when unjoining
authorRichard Fairhurst <richard@systemed.net>
Thu, 4 Nov 2010 18:04:18 +0000 (18:04 +0000)
committerRichard Fairhurst <richard@systemed.net>
Thu, 4 Nov 2010 18:04:18 +0000 (18:04 +0000)
net/systemeD/halcyon/connection/actions/UnjoinNodeAction.as

index d9dac6f0d777d6190ae4cd424b4d3f339dadf987..279e1b875d99ed1b2e66a962e0ae158892ca9c76 100644 (file)
@@ -19,8 +19,11 @@ package net.systemeD.halcyon.connection.actions {
               return NO_CHANGE;
             }
 
+            var ways:Array=[];
             for each (var way:Way in node.parentWays) {
+              way.suspend(); ways.push(way);
               if (way == selectedWay) {
+               way.dispatchEvent(new EntityEvent(Connection.WAY_REORDERED, way));      // no longer a junction, so force redraw
                 continue;
               } else {
                 var newNode:Node = Connection.getConnection().createNode(node.getTagsCopy(), node.lat, node.lon, push);
@@ -32,11 +35,8 @@ package net.systemeD.halcyon.connection.actions {
                 }
               }
             }
-            node.suspend();
-            selectedWay.suspend();
             super.doAction();
-            selectedWay.resume();
-            node.resume();
+            for each (way in ways) { way.resume(); }
 
             return SUCCESS;
         }