Unify selection ControllerStates so they can work on either background or editable...
[potlatch2.git] / net / systemeD / halcyon / connection / actions / RemoveNodeByIndexAction.as
index 7021379c3d171725a84c2564147666db6ec64a67..9f2303dadd7e391da233dbc79278ed23f94e08ca 100644 (file)
@@ -23,7 +23,7 @@ package net.systemeD.halcyon.connection.actions {
                        var node:Node=nodeList[index];
                        removed=[];
 
-                       while (nodeList[index]==node || nodeList[index]==preceding) {
+                       while (nodeList[index]==node || (nodeList[index]==preceding && preceding!=null)) {
                                var removedNode:Node=nodeList.splice(index, 1)[0];
                                removed.push(removedNode);
                                if (nodeList.indexOf(removedNode)==-1) { removedNode.removeParent(way); }