Changeset 943 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode
- Timestamp:
- 2008-09-10T01:09:39+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r868 r943 168 168 return; 169 169 170 if(virtualWay != null) 171 { 170 if (virtualWay != null) { 172 171 Collection<Command> virtualCmds = new LinkedList<Command>(); 173 172 virtualCmds.add(new AddCommand(virtualNode)); … … 181 180 virtualWay = null; 182 181 virtualNode = null; 183 } 184 else 185 { 182 } else { 186 183 Collection<OsmPrimitive> selection = Main.ds.getSelected(); 187 184 Collection<Node> affectedNodes = AllNodesVisitor.getAllNodes(selection); … … 193 190 Command c = !Main.main.undoRedo.commands.isEmpty() 194 191 ? Main.main.undoRedo.commands.getLast() : null; 195 if (c instanceof SequenceCommand)192 if (c instanceof SequenceCommand) 196 193 c = ((SequenceCommand)c).getLastCommand(); 197 194 … … 232 229 snapDistance *= snapDistance; 233 230 OsmPrimitive osm = c.getNearestNode(p); 231 virtualWay = null; 232 virtualNode = null; 233 234 234 if (osm == null) 235 235 { 236 236 WaySegment nearestWaySeg = c.getNearestWaySegment(p); 237 if (nearestWaySeg != null)237 if (nearestWaySeg != null) 238 238 { 239 239 osm = nearestWaySeg.way; … … 246 246 { 247 247 Point pc = new Point((p1.x+p2.x)/2, (p1.y+p2.y)/2); 248 if (p.distanceSq(pc) < snapDistance)248 if (p.distanceSq(pc) < snapDistance) 249 249 { 250 250 virtualWay = nearestWaySeg;
Note:
See TracChangeset
for help on using the changeset viewer.