Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 2008)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 2009)
@@ -51,5 +51,4 @@
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.OptionPaneUtil;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.MapViewPaintable;
@@ -136,5 +135,5 @@
                         default:
                             Main.map.mapView.setCursor(cursorCrosshair);
-                        break;
+                            break;
                     }
                 }
@@ -340,5 +339,5 @@
         if (n != null) {
             // user clicked on node
-            if (selection.isEmpty()) {
+            if (selection.isEmpty() || wayIsFinished) {
                 // select the clicked node and do nothing else
                 // (this is just a convenience option so that people don't
@@ -355,5 +354,5 @@
             n = new Node(Main.map.mapView.getLatLon(e.getX(), e.getY()));
             if (n.getCoor().isOutSideWorld()) {
-                OptionPaneUtil.showMessageDialog(
+                JOptionPane.showMessageDialog(
                         Main.parent,
                         tr("Cannot add a node outside of the world."),
@@ -855,12 +854,12 @@
             default:
                 EastNorth P = n.getEastNorth();
-            seg = segs.iterator().next();
-            A = seg.a.getEastNorth();
-            B = seg.b.getEastNorth();
-            double a = P.distanceSq(B);
-            double b = P.distanceSq(A);
-            double c = A.distanceSq(B);
-            q = (a - b + c) / (2*c);
-            n.setEastNorth(new EastNorth(B.east() + q * (A.east() - B.east()), B.north() + q * (A.north() - B.north())));
+                seg = segs.iterator().next();
+                A = seg.a.getEastNorth();
+                B = seg.b.getEastNorth();
+                double a = P.distanceSq(B);
+                double b = P.distanceSq(A);
+                double c = A.distanceSq(B);
+                q = (a - b + c) / (2*c);
+                n.setEastNorth(new EastNorth(B.east() + q * (A.east() - B.east()), B.north() + q * (A.north() - B.north())));
         }
     }
