Changeset 452 in josm for trunk/src/org
- Timestamp:
- 2007-11-04T14:14:48+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r424 r452 73 73 selectionManager = new SelectionManager(this, false, mapFrame.mapView); 74 74 try { initialMoveDelay = Integer.parseInt(Main.pref.get("edit.initial-move-delay","100")); } catch (NumberFormatException x) {}; 75 76 77 75 } 78 76 … … 197 195 mouseDownTime = System.currentTimeMillis(); 198 196 197 // find the object that was clicked on. 198 // if the object is not part of the current selection, clear current 199 // selection before proceeding. 200 Collection<OsmPrimitive> osmColl = null; 199 201 OsmPrimitive osm = Main.map.mapView.getNearest(e.getPoint()); 200 Collection<OsmPrimitive> osmColl;201 202 if (osm == null) { 202 203 osmColl = Collections.emptySet(); 204 Main.ds.setSelected(); 203 205 } else { 204 206 osmColl = Collections.singleton(osm); 205 } 206 207 if (!Main.ds.getSelected().contains(osm)) Main.ds.setSelected(); 208 } 209 207 210 if (ctrl && shift) { 208 selectPrims(osmColl, true, false);211 if (Main.ds.getSelected().isEmpty()) selectPrims(osmColl, true, false); 209 212 mode = Mode.rotate; 210 213 setCursor(ImageProvider.getCursor("rotate", null)); 211 } else if ( osm != null) {212 selectPrims(osmColl, shift, ctrl);214 } else if (!osmColl.isEmpty()) { 215 if (Main.ds.getSelected().isEmpty()) selectPrims(osmColl, shift, ctrl); 213 216 mode = Mode.move; 214 217 } else {
Note:
See TracChangeset
for help on using the changeset viewer.