Merge branch 'master' into history
[potlatch2.git] / net / systemeD / halcyon / connection / Way.as
index 4ad7f455d221a27c1930ae13242fb2516653a2c6..bdb17162b7e53cb33c0aae430c50c5b183925691 100644 (file)
@@ -94,12 +94,12 @@ package net.systemeD.halcyon.connection {
         }
 
         public function appendNode(node:Node, performAction:Function):uint {
-                       insertNode(nodes.length, node, performAction);
+                       if (node!=getLastNode()) performAction(new AddNodeToWayAction(this, node, nodes, -1));
             return nodes.length + 1;
         }
         
         public function prependNode(node:Node, performAction:Function):uint {
-                       insertNode(0, node, performAction);
+                       if (node!=getFirstNode()) performAction(new AddNodeToWayAction(this, node, nodes, 0));
             return nodes.length + 1;
         }