Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 5434)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 5435)
@@ -248,12 +248,14 @@
 
         virtualManager.clear();
-        if(mode == Mode.move && virtualManager.setupVirtual(e.getPoint())) {
-            DataSet ds = getCurrentDataSet();
-            if (ds != null && drawTargetHighlight) {
-                ds.setHighlightedVirtualNodes(virtualManager.virtualWays);
-            }
-            mv.setNewCursor(SelectActionCursor.virtual_node.cursor(), this);
-            // don't highlight anything else if a virtual node will be
-            return repaintIfRequired(newHighlights);
+        if(mode == Mode.move) {
+            if (!dragInProgress() && virtualManager.activateVirtualNodeNearPoint(e.getPoint())) {
+                DataSet ds = getCurrentDataSet();
+                if (ds != null && drawTargetHighlight) {
+                    ds.setHighlightedVirtualNodes(virtualManager.virtualWays);
+                }
+                mv.setNewCursor(SelectActionCursor.virtual_node.cursor(), this);
+                // don't highlight anything else if a virtual node will be
+                return repaintIfRequired(newHighlights);
+            }
         }
 
@@ -432,5 +434,5 @@
             // so this is not movement, but selection on primitive under cursor
             if (!cancelDrawMode && nearestPrimitive instanceof Way) {
-                virtualManager.setupVirtual(e.getPoint());
+                virtualManager.activateVirtualNodeNearPoint(e.getPoint());
             }
             selectPrims(cycleManager.cycleSetup(nearestPrimitive, e.getPoint()), false, false);
@@ -523,14 +525,14 @@
             int dp = (int) lastMousePos.distance(e.getX(), e.getY());
             if (dp < initialMoveThreshold)
-                return;
-            initialMoveThresholdExceeded = true;
-        }
-
+                return; // ignore small drags
+            initialMoveThresholdExceeded = true; //no more ingnoring uintil nex mouse press
+        }
+        if (e.getPoint().equals(lastMousePos))
+            return;
+        
         EastNorth currentEN = mv.getEastNorth(e.getX(), e.getY());
-        if (e.getPoint().equals(lastMousePos))
-            return;
-        
-        if (virtualManager.hasVirtualWays()) {
-            virtualManager.processVirtualNodeMovements(currentEN);
+
+        if (virtualManager.hasVirtualWaysToBeConstructed()) {
+            virtualManager.createMiddleNodeFromVirtual(currentEN);
         } else {
             if (!updateCommandWhileDragging(currentEN)) return;
@@ -807,5 +809,5 @@
         // anything if about to drag the virtual node (i.e. !released) but continue if the
         // cursor is only released above a virtual node by accident (i.e. released). See #7018
-        if ((shift && ctrl) || (ctrl && !released) || (virtualManager.hasVirtualWays() && !released))
+        if ((shift && ctrl) || (ctrl && !released) || (virtualManager.hasVirtualWaysToBeConstructed() && !released))
             return;
 
@@ -1034,7 +1036,7 @@
          * <code>virtualWays</code> were setup.
          */
-        private boolean setupVirtual(Point p) {
+        private boolean activateVirtualNodeNearPoint(Point p) {
             if (nodeVirtualSize > 0) {
-                
+
                 Collection<WaySegment> selVirtualWays = new LinkedList<WaySegment>();
                 Pair<Node, Node> vnp = null, wnp = new Pair<Node, Node>(null, null);
@@ -1058,4 +1060,7 @@
                             }
                             if (vnp.equals(wnp)) {
+                                // if mutiple line segments have the same points,
+                                // add all segments to be splitted to virtualWays list
+                                // if some lines are selected, only their segments will go to virtualWays
                                 (w.isSelected() ? selVirtualWays : virtualWays).add(ws);
                             }
@@ -1072,5 +1077,5 @@
         }
 
-        private void processVirtualNodeMovements(EastNorth currentEN) {
+        private void createMiddleNodeFromVirtual(EastNorth currentEN) {
             Collection<Command> virtualCmds = new LinkedList<Command>();
             virtualCmds.add(new AddCommand(virtualNode));
@@ -1099,5 +1104,5 @@
         }
 
-        private boolean hasVirtualWays() {
+        private boolean hasVirtualWaysToBeConstructed() {
             return !virtualWays.isEmpty();
         }
