Index: /applications/editors/josm/plugins/turbopen/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java
===================================================================
--- /applications/editors/josm/plugins/turbopen/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 26110)
+++ /applications/editors/josm/plugins/turbopen/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 26111)
@@ -20,5 +20,9 @@
     
     private int lastIdx;
-
+    private boolean closedFlag;
+
+    public DrawnPolyLine() {
+        clear();
+    }
     public void setMv(MapView mv) {
         this.mv = mv;
@@ -56,4 +60,5 @@
         used=null;
         lastIdx=0;
+        closedFlag=false;
         fixed.clear();
         simplePoints=null;
@@ -66,5 +71,4 @@
         lastIdx--;
         }
-        
     }
     
@@ -78,4 +82,5 @@
     }
     void addLast(LatLon coor) {
+        if (closedFlag && lastIdx>points.size()-1) return;
         if (lastIdx>=points.size()-1) {
             //System.out.println("add last "+points.size());
@@ -177,4 +182,8 @@
     void closeLine() {
         points.add(points.getFirst());
+        closedFlag=true;
+    }
+    boolean isClosed() {
+        return closedFlag;
     }
     
@@ -201,4 +210,5 @@
             }if (f &&(!it.hasNext())) {
                 // if end of whole line reached
+                closedFlag=false;
                 it.remove();
                 lastIdx=points.size()-1;
@@ -273,3 +283,19 @@
     }
 
+    void moveNode(int dragNode, LatLon coor) {
+        LatLon dragged = points.get(dragNode);
+        // points.getLast().equals(points.getFirst()
+        if (closedFlag && points.getFirst().equals(dragged)) {
+            // move both ends
+            points.set(0, coor);
+            points.set(points.size()-1, coor);
+        } else {
+            points.set(dragNode, coor);
+        }
+        if (fixed.contains(dragged)) {
+                fixed.remove(dragged);
+                fixed.add(coor);
+         }
+    }
+
 }
Index: /applications/editors/josm/plugins/turbopen/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java
===================================================================
--- /applications/editors/josm/plugins/turbopen/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26110)
+++ /applications/editors/josm/plugins/turbopen/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26111)
@@ -82,5 +82,4 @@
     private final Stroke strokeForSimplified;
     private final Stroke strokeForOriginal;
-    private boolean ready;
     private final Cursor cursorDraw;
     private final Cursor cursorCtrl;
@@ -92,4 +91,5 @@
     private int nearestIdx;
     private Stroke strokeForDelete;
+    private int dragNode=-1;
     
 
@@ -195,5 +195,5 @@
                 p2 = line.getPoint(pp2);
                 if (shift && highlighted==pp1 && nearestIdx<0) {lineColor=COLOR_SELECTEDFRAGMENT;}
-                if (line.isLastPoint(i)) { lineColor=COLOR_EDITEDFRAGMENT; }
+                if (!shift && line.isLastPoint(i)) { lineColor=COLOR_EDITEDFRAGMENT; }
                 g.setColor(lineColor);
                 g.drawLine(p1.x, p1.y, p2.x, p2.y);
@@ -206,18 +206,20 @@
                     g.fillRect(p2.x - 1, p2.y - 1, 3, 3);
                 }
-                if (shift && !line.wasSimplified() && nearestIdx==i+1 ) {
-                    // highlight node to delete
-                    g.setStroke(strokeForDelete);
-                    g.setColor(COLOR_DELETE);
-                    g.drawLine(p2.x - 5, p2.y - 5,p2.x + 5, p2.y + 5);
-                    g.drawLine(p2.x - 5, p2.y + 5,p2.x + 5, p2.y - 5);
-                    g.setStroke(strokeForOriginal);
-                }
-                if (ctrl && !line.wasSimplified() && nearestIdx==i+1 ) {
-                    // highlight node to toggle fixation
-                    g.setStroke(strokeForDelete);
-                    g.setColor( line.isFixed(pp2) ? COLOR_NORMAL: COLOR_FIXED);
-                    g.drawOval(p2.x - 5, p2.y - 5, 11, 11);
-                    g.setStroke(strokeForOriginal);
+                if (!drawing) {
+                    if (shift && !line.wasSimplified() && nearestIdx==i+1 ) {
+                        // highlight node to delete
+                        g.setStroke(strokeForDelete);
+                        g.setColor(COLOR_DELETE);
+                        g.drawLine(p2.x - 5, p2.y - 5,p2.x + 5, p2.y + 5);
+                        g.drawLine(p2.x - 5, p2.y + 5,p2.x + 5, p2.y - 5);
+                        g.setStroke(strokeForOriginal);
+                    }
+                    if (ctrl && !line.wasSimplified() && nearestIdx==i+1 ) {
+                        // highlight node to toggle fixation
+                        g.setStroke(strokeForDelete);
+                        g.setColor( line.isFixed(pp2) ? COLOR_NORMAL: COLOR_FIXED);
+                        g.drawOval(p2.x - 5, p2.y - 5, 11, 11);
+                        g.setStroke(strokeForOriginal);
+                    }
                 }
             }
@@ -247,9 +249,9 @@
         
         int idx=line.findClosestPoint(e.getPoint(),maxDist);
-        if (idx==0) {
+        if (idx==0 && !line.isClosed()) {
             line.closeLine();
             // the way should become closed
             drawing=false;
-            ready=true;
+            dragNode=0;
             updateCursor();
             return;
@@ -267,8 +269,10 @@
                 line.toggleFixed(idx);                
             }
+            // node dragging
+            dragNode=idx;
             return;
         }
-        
-        if (ready) { setStatusLine(tr(SIMPLIFYMODE_MESSAGE)); return;  }
+
+        //if (line.isClosed()) { setStatusLine(tr(SIMPLIFYMODE_MESSAGE));return;  }
         drawing = true;
         
@@ -295,7 +299,8 @@
         if (!isEnabled()) return;
         if (e.getButton() != MouseEvent.BUTTON1) return;
+        dragNode = -1;
         drawing = false;
         highlighted=null;
-        if (!ready) setStatusLine(tr(DRAWINGMODE_MESSAGE));
+        if (!line.isClosed()) setStatusLine(tr(DRAWINGMODE_MESSAGE));
         repaint();
     }
@@ -316,4 +321,10 @@
         
         if (!drawing) {
+            if (dragNode>=0) {
+                line.moveNode(dragNode,getLatLon(e));
+                repaint();
+                return;
+            }
+
             if (shift) {
                 // find line fragment to highlight
@@ -326,5 +337,5 @@
             return;
         }
-        if (ready) setStatusLine(tr(SIMPLIFYMODE_MESSAGE));
+        if (line.isClosed()) setStatusLine(tr(SIMPLIFYMODE_MESSAGE));
         
         // do not draw points close to existing points - we do not want self-intersections
@@ -404,5 +415,4 @@
     public void newDrawing() {
         eps=startingEps;
-        ready=false;
         line.clear();
     }
@@ -532,5 +542,5 @@
     private void updateCursor() {
         if (shift) Main.map.mapView.setCursor(cursorShift); else
-        if (ready) Main.map.mapView.setCursor(cursorReady); else
+        if (line.isClosed()) Main.map.mapView.setCursor(cursorReady); else
         if (ctrl) Main.map.mapView.setCursor(cursorCtrl); else
         if (nearpoint) Main.map.mapView.setCursor(cursorCtrl); else
