don't break if trying to cycle ways when there's only one anyway
authorRichard Fairhurst <richard@systemed.net>
Sun, 28 Nov 2010 19:00:53 +0000 (19:00 +0000)
committerRichard Fairhurst <richard@systemed.net>
Sun, 28 Nov 2010 19:00:53 +0000 (19:00 +0000)
net/systemeD/potlatch2/controller/SelectedWayNode.as

index 549eb02..e959a0a 100644 (file)
@@ -84,6 +84,7 @@ package net.systemeD.potlatch2.controller {
 
                private function cycleWays():ControllerState {
                        var wayList:Array=firstSelected.parentWays;
+                       if (wayList.length==1) { return this; }
                        wayList.splice(wayList.indexOf(parentWay),1);
                        return new SelectedWay(wayList[0],
                                               new Point(controller.map.lon2coord(Node(firstSelected).lon),