Bugfix: Parallelise adding too many nodes to way. Thanks to RafaƂ Rudzik for patch
authorAndy Allan <gravitystorm@gmail.com>
Mon, 22 Nov 2010 17:01:13 +0000 (17:01 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Mon, 22 Nov 2010 17:01:13 +0000 (17:01 +0000)
net/systemeD/potlatch2/tools/Parallelise.as

index ae3c35e..af0585f 100644 (file)
@@ -73,7 +73,10 @@ package net.systemeD.potlatch2.tools {
                                }
                        }
 
-                       if (originalWay.isArea()) { parallelWay.appendNode(nodes[0],undo.push); }
+            if  ( originalWay.isArea() && parallelWay.getLastNode() != parallelWay.getNode(0) ) {
+                parallelWay.appendNode(nodes[0],undo.push);
+            }
+
                        parallelWay.resume();
                        undo.doAction();                // don't actually add it to the undo stack, just do it!
                }