Ignore:
Timestamp:
2014-08-13T23:07:06+02:00 (5 years ago)
Author:
bastiK
Message:

see #10363 - you cannot click on object that is not visible on the map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r7218 r7389  
    233233    private boolean giveUserFeedback(MouseEvent e, int modifiers) {
    234234        Collection<OsmPrimitive> c = asColl(
    235                 mv.getNearestNodeOrWay(e.getPoint(), OsmPrimitive.isSelectablePredicate, true));
     235                mv.getNearestNodeOrWay(e.getPoint(), mv.isSelectablePredicate, true));
    236236
    237237        updateKeyModifiers(modifiers);
     
    406406        // primitives under cursor are stored in c collection
    407407
    408         OsmPrimitive nearestPrimitive = mv.getNearestNodeOrWay(e.getPoint(), OsmPrimitive.isSelectablePredicate, true);
     408        OsmPrimitive nearestPrimitive = mv.getNearestNodeOrWay(e.getPoint(), mv.isSelectablePredicate, true);
    409409
    410410        determineMapMode(nearestPrimitive!=null);
     
    687687        Collection<OsmPrimitive> selection = getCurrentDataSet().getSelectedNodesAndWays();
    688688        if (selection.isEmpty()) { // if nothing was selected to drag, just select nearest node/way to the cursor
    689             OsmPrimitive nearestPrimitive = mv.getNearestNodeOrWay(mv.getPoint(startEN), OsmPrimitive.isSelectablePredicate, true);
     689            OsmPrimitive nearestPrimitive = mv.getNearestNodeOrWay(mv.getPoint(startEN), mv.isSelectablePredicate, true);
    690690            getCurrentDataSet().setSelected(nearestPrimitive);
    691691        }
     
    858858        Collection<Node> target = mv.getNearestNodes(p,
    859859                getCurrentDataSet().getSelectedNodes(),
    860                 OsmPrimitive.isSelectablePredicate);
     860                mv.isSelectablePredicate);
    861861        return target.isEmpty() ? null : target.iterator().next();
    862862    }
     
    964964                    if (waitForMouseUpParameter) {
    965965                        // prefer a selected nearest node or way, if possible
    966                         osm = mv.getNearestNodeOrWay(p, OsmPrimitive.isSelectablePredicate, true);
     966                        osm = mv.getNearestNodeOrWay(p, mv.isSelectablePredicate, true);
    967967                    }
    968968                } else {
    969969                    // Alt + left mouse button pressed: we need to build cycle list
    970                     cycleList = mv.getAllNearest(p, OsmPrimitive.isSelectablePredicate);
     970                    cycleList = mv.getAllNearest(p, mv.isSelectablePredicate);
    971971
    972972                    if (cycleList.size() > 1) {
     
    11041104
    11051105                Way w = null;
    1106                 for (WaySegment ws : mv.getNearestWaySegments(p, OsmPrimitive.isSelectablePredicate)) {
     1106                for (WaySegment ws : mv.getNearestWaySegments(p, mv.isSelectablePredicate)) {
    11071107                    w = ws.way;
    11081108
Note: See TracChangeset for help on using the changeset viewer.