Index: src/org/openstreetmap/josm/gui/draw/MapViewPath.java
===================================================================
--- src/org/openstreetmap/josm/gui/draw/MapViewPath.java	(revision 17425)
+++ src/org/openstreetmap/josm/gui/draw/MapViewPath.java	(working copy)
@@ -170,13 +170,17 @@
             } else {
                 lineTo(n);
             }
-            if (close && first == null) {
+            if (first == null) {
                 first = n;
             }
             useMoveTo = false;
         }
-        if (first != null) {
-            lineTo(first);
+        if (close && first != null) {
+            if (!connect)
+                closePath();
+            else {
+                lineTo(first);
+            }
         }
     }
 
