Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 942)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 943)
@@ -168,6 +168,5 @@
 			return;
 
-		if(virtualWay != null)
-		{
+		if (virtualWay != null)	{
 			Collection<Command> virtualCmds = new LinkedList<Command>();
 			virtualCmds.add(new AddCommand(virtualNode));
@@ -181,7 +180,5 @@
 			virtualWay = null;
 			virtualNode = null;
-		}
-		else
-		{
+		} else {
 			Collection<OsmPrimitive> selection = Main.ds.getSelected();
 			Collection<Node> affectedNodes = AllNodesVisitor.getAllNodes(selection);
@@ -193,5 +190,5 @@
 			Command c = !Main.main.undoRedo.commands.isEmpty()
 				? Main.main.undoRedo.commands.getLast() : null;
-			if(c instanceof SequenceCommand)
+			if (c instanceof SequenceCommand)
 				c = ((SequenceCommand)c).getLastCommand();
 
@@ -232,8 +229,11 @@
 		snapDistance *= snapDistance;
 		OsmPrimitive osm = c.getNearestNode(p);
+		virtualWay = null;
+		virtualNode = null;
+		
 		if (osm == null)
 		{
 			WaySegment nearestWaySeg = c.getNearestWaySegment(p);
-			if(nearestWaySeg != null)
+			if (nearestWaySeg != null)
 			{
 				osm = nearestWaySeg.way;
@@ -246,5 +246,5 @@
 					{
 						Point pc = new Point((p1.x+p2.x)/2, (p1.y+p2.y)/2);
-						if(p.distanceSq(pc) < snapDistance)
+						if (p.distanceSq(pc) < snapDistance)
 						{
 							virtualWay = nearestWaySeg;
