Changeset 3177 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2010-04-11T15:29:02+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r2431 r3177 41 41 42 42 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments( 43 Main.map.mapView.getPoint(node) );43 Main.map.mapView.getPoint(node), OsmPrimitive.isSelectablePredicate); 44 44 HashMap<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>(); 45 45 for (WaySegment ws : wss) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r2986 r3177 19 19 import org.openstreetmap.josm.command.DeleteCommand; 20 20 import org.openstreetmap.josm.data.osm.Node; 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 22 import org.openstreetmap.josm.data.osm.Relation; 22 23 import org.openstreetmap.josm.data.osm.WaySegment; … … 286 287 DeleteParameters result = new DeleteParameters(); 287 288 288 result.nearestNode = Main.map.mapView.getNearestNode(e.getPoint() );289 result.nearestNode = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive.isSelectablePredicate); 289 290 if (result.nearestNode == null) { 290 result.nearestSegment = Main.map.mapView.getNearestWaySegment(e.getPoint() );291 result.nearestSegment = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive.isSelectablePredicate); 291 292 if (result.nearestSegment != null) { 292 293 if (shift) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r3116 r3177 164 164 if (mouseOnExistingNode == null && getCurrentDataSet().getSelected().size() == 0 165 165 && mousePos != null) { 166 mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos );166 mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate); 167 167 } 168 168 … … 332 332 333 333 if (!ctrl) { 334 n = Main.map.mapView.getNearestNode(mousePos );334 n = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate); 335 335 } 336 336 … … 366 366 if (!ctrl) { 367 367 // Insert the node into all the nearby way segments 368 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint() );368 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive.isSelectablePredicate); 369 369 Map<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>(); 370 370 for (WaySegment ws : wss) { … … 681 681 682 682 if (!ctrl && mousePos != null) { 683 currentMouseNode = mv.getNearestNode(mousePos );683 currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate); 684 684 } 685 685 … … 687 687 // *and* there is no node nearby (because nodes beat ways when re-using) 688 688 if(!ctrl && currentMouseNode == null) { 689 List<WaySegment> wss = mv.getNearestWaySegments(mousePos );689 List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive.isSelectablePredicate); 690 690 for(WaySegment ws : wss) { 691 691 mouseOnExistingWays.add(ws.way); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r2990 r3177 308 308 // boolean shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0; 309 309 310 selectedSegment = Main.map.mapView.getNearestWaySegment(e.getPoint() );310 selectedSegment = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive.isSelectablePredicate); 311 311 312 312 if (selectedSegment == null) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r2719 r3177 285 285 int snapDistance = Main.pref.getInteger("mappaint.node.virtual-snap-distance", 8); 286 286 snapDistance *= snapDistance; 287 OsmPrimitive osm = c.getNearestNode(p );287 OsmPrimitive osm = c.getNearestNode(p, OsmPrimitive.isSelectablePredicate); 288 288 virtualWays.clear(); 289 289 virtualNode = null; … … 293 293 { 294 294 Collection<WaySegment> nearestWaySegs = allSegements 295 ? c.getNearestWaySegments(p )296 : Collections.singleton(c.getNearestWaySegment(p ));295 ? c.getNearestWaySegments(p, OsmPrimitive.isSelectablePredicate) 296 : Collections.singleton(c.getNearestWaySegment(p, OsmPrimitive.isSelectablePredicate)); 297 297 298 298 for(WaySegment nearestWS : nearestWaySegs) { … … 435 435 if (!didMove) { 436 436 selectPrims( 437 Main.map.mapView.getNearestCollection(e.getPoint() ),437 Main.map.mapView.getNearestCollection(e.getPoint(), OsmPrimitive.isSelectablePredicate), 438 438 shift, ctrl, true, false); 439 439 … … 485 485 if (ctrl) { 486 486 Collection<Node> affectedNodes = OsmPrimitive.getFilteredSet(selection, Node.class); 487 Collection<Node> nn = Main.map.mapView.getNearestNodes(e.getPoint(), affectedNodes );487 Collection<Node> nn = Main.map.mapView.getNearestNodes(e.getPoint(), affectedNodes, OsmPrimitive.isSelectablePredicate); 488 488 if (nn != null) { 489 489 Node targetNode = nn.iterator().next();
Note:
See TracChangeset
for help on using the changeset viewer.