change relation.appendMember to use the undo system, and update various places as...
[potlatch2.git] / net / systemeD / halcyon / connection / actions / RemoveNodeFromWayAction.as
index 2e29db06523c709dcbf99fdc33cd9d2a1ec2d9f3..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;
                        }
@@ -36,11 +37,11 @@ package net.systemeD.halcyon.connection.actions {
             
             for (var i:int = nodeRemovedFrom.length - 1; i >= 0; i--) {
                 var index:int = nodeRemovedFrom[i];
-                trace("node being added "+index+" "+i+" "+node);
                 nodeList.splice(index, 0, node);
                entity.dispatchEvent(new WayNodeEvent(Connection.WAY_NODE_ADDED, node, Way(entity), index));
             }
             
+            entity.deleted = nodeList.length == 0;
             markClean();
             
             return SUCCESS;