Changeset 424 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2007-10-26T08:47:32+02:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r422 r424 52 52 53 53 public MergeNodesAction() { 54 super(tr("Merge Nodes"), " combineway", tr("Merge nodes into one."), KeyEvent.VK_M, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true);54 super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into one."), KeyEvent.VK_M, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true); 55 55 DataSet.selListeners.add(this); 56 56 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r422 r424 233 233 } 234 234 restoreCursor(); 235 if (mode == Mode.move) { 236 boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0; 237 if (ctrl) { 238 Collection<OsmPrimitive> selection = Main.ds.getSelected(); 239 Collection<Node> affectedNodes = AllNodesVisitor.getAllNodes(selection); 240 Collection<Node> nn = Main.map.mapView.getNearestNodes(e.getPoint(), affectedNodes); 241 if (nn != null) { 242 Node n = nn.iterator().next(); 243 LinkedList<Node> selNodes = new LinkedList<Node>(); 244 for (OsmPrimitive osm : selection) 245 if (osm instanceof Node) 246 selNodes.add((Node)osm); 247 if (selNodes.size() > 0) { 248 selNodes.add(n); 249 MergeNodesAction.mergeNodes(selNodes, n); 250 } 251 } 252 } 253 } 235 236 if (mode == Mode.move) { 237 boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0; 238 if (ctrl) { 239 Collection<OsmPrimitive> selection = Main.ds.getSelected(); 240 Collection<Node> affectedNodes = AllNodesVisitor.getAllNodes(selection); 241 Collection<Node> nn = Main.map.mapView.getNearestNodes(e.getPoint(), affectedNodes); 242 if (nn != null) { 243 Node n = nn.iterator().next(); 244 LinkedList<Node> selNodes = new LinkedList<Node>(); 245 for (OsmPrimitive osm : selection) 246 if (osm instanceof Node) 247 selNodes.add((Node)osm); 248 if (selNodes.size() > 0) { 249 selNodes.add(n); 250 MergeNodesAction.mergeNodes(selNodes, n); 251 } 252 } 253 } 254 } 255 254 256 updateStatusLine(); 255 257 mode = null;
Note:
See TracChangeset
for help on using the changeset viewer.