Prevent single-node ways from being created by undo.
[potlatch2.git] / net / systemeD / halcyon / connection / Way.as
index d5f991cf06b2c7b8efeb5b57be603e57d03d523f..0f97958b0e5a82e69fac635fa8a16057b66c8cb5 100644 (file)
@@ -94,12 +94,12 @@ package net.systemeD.halcyon.connection {
         }
 
         public function appendNode(node:Node, performAction:Function):uint {
-                       if (node!=getLastNode()) performAction(new AddNodeToWayAction(this, node, nodes, -1));
+                       insertNode(nodes.length, node, performAction);
             return nodes.length + 1;
         }
         
         public function prependNode(node:Node, performAction:Function):uint {
-                       if (node!=getFirstNode()) performAction(new AddNodeToWayAction(this, node, nodes, 0));
+                       insertNode(0, node, performAction);
             return nodes.length + 1;
         }