can fixing it really be this simple?
authorRichard Fairhurst <richard@systemed.net>
Mon, 2 Aug 2010 18:56:42 +0000 (18:56 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 2 Aug 2010 18:56:42 +0000 (18:56 +0000)
net/systemeD/halcyon/connection/actions/RemoveNodeByIndexAction.as
net/systemeD/halcyon/connection/actions/RemoveNodeFromWayAction.as

index 7bea7e3242f06f42ba8df50173af67f4f9371aec..2e623aecfaaff9b472e696bbe9f15c9404cf0623 100644 (file)
@@ -21,6 +21,7 @@ package net.systemeD.halcyon.connection.actions {
         public override function doAction():uint {
             removed = nodeList.splice(index, 1);
             if (nodeList.indexOf(removed[0])==-1) { removed[0].removeParent(way); }
+            way.deleted = nodeList.length == 0;
             markDirty();
             if (fireEvent) {
                entity.dispatchEvent(new WayNodeEvent(Connection.WAY_NODE_REMOVED, removed[0], way, index));
@@ -31,6 +32,7 @@ package net.systemeD.halcyon.connection.actions {
         public override function undoAction():uint {
             nodeList.splice(index, 0, removed[0]);
             removed[0].addParent(way);
+            way.deleted = nodeList.length == 0;
             markClean();
             if (fireEvent) {
                 entity.dispatchEvent(new WayNodeEvent(Connection.WAY_NODE_ADDED, removed[0], way, index));
index 239d8d69464d9885697ed736db10d8afc62e2fce..760866aca3dac520015287355d71506629ce1e36 100644 (file)
@@ -24,6 +24,7 @@ package net.systemeD.halcyon.connection.actions {
                        
                        if ( nodeRemovedFrom.length > 0 ) {
                            node.removeParent(entity);
+                           entity.deleted = nodeList.length == 0;
                            markDirty();
                            return SUCCESS;
                        }
@@ -40,6 +41,7 @@ package net.systemeD.halcyon.connection.actions {
                entity.dispatchEvent(new WayNodeEvent(Connection.WAY_NODE_ADDED, node, Way(entity), index));
             }
             
+            entity.deleted = nodeList.length == 0;
             markClean();
             
             return SUCCESS;