- Timestamp:
- 2016-08-03T15:30:04+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r10619 r10716 94 94 for (Node node : selectedNodes) { 95 95 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments( 96 Main.map.mapView.getPoint(node), OsmPrimitive .isSelectablePredicate);96 Main.map.mapView.getPoint(node), OsmPrimitive::isSelectable); 97 97 98 98 MultiMap<Way, Integer> insertPoints = new MultiMap<>(); -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r10552 r10716 73 73 if (selectedNodes.size() == 1) { 74 74 List<Node> nearestNodes = Main.map.mapView.getNearestNodes( 75 Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive .isUsablePredicate);75 Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive::isUsable); 76 76 if (nearestNodes.isEmpty()) { 77 77 new Notification( -
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r10657 r10716 134 134 @Override 135 135 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 136 setEnabled(selection.stream().anyMatch( OsmPrimitive.wayPredicate));136 setEnabled(selection.stream().anyMatch(Way.class::isInstance)); 137 137 } 138 138 } -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r10657 r10716 255 255 private static boolean isUsedInRelations(final Collection<Node> existingNodes) { 256 256 return existingNodes.stream().anyMatch( 257 selectedNode -> selectedNode.getReferrers().stream().anyMatch( OsmPrimitive.relationPredicate));257 selectedNode -> selectedNode.getReferrers().stream().anyMatch(Relation.class::isInstance)); 258 258 } 259 259 -
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r10467 r10716 362 362 DeleteParameters result = new DeleteParameters(); 363 363 364 result.nearestNode = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive .isSelectablePredicate);364 result.nearestNode = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive::isSelectable); 365 365 if (result.nearestNode == null) { 366 result.nearestSegment = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive .isSelectablePredicate);366 result.nearestSegment = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive::isSelectable); 367 367 if (result.nearestSegment != null) { 368 368 if (shift) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r10678 r10716 399 399 400 400 boolean newNode = false; 401 Node n = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive .isSelectablePredicate);401 Node n = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive::isSelectable); 402 402 if (ctrl) { 403 403 Iterator<Way> it = ds.getSelectedWays().iterator(); … … 469 469 // Insert the node into all the nearby way segments 470 470 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments( 471 Main.map.mapView.getPoint(n), OsmPrimitive .isSelectablePredicate);471 Main.map.mapView.getPoint(n), OsmPrimitive::isSelectable); 472 472 if (snapHelper.isActive()) { 473 473 tryToMoveNodeOnIntersection(wss, n); … … 761 761 */ 762 762 private void tryToSetBaseSegmentForAngleSnap() { 763 WaySegment seg = Main.map.mapView.getNearestWaySegment(mousePos, OsmPrimitive .isSelectablePredicate);763 WaySegment seg = Main.map.mapView.getNearestWaySegment(mousePos, OsmPrimitive::isSelectable); 764 764 if (seg != null) { 765 765 snapHelper.setBaseSegment(seg); … … 790 790 791 791 if (!ctrl && mousePos != null) { 792 currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive .isSelectablePredicate);792 currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive::isSelectable); 793 793 } 794 794 … … 796 796 // *and* there is no node nearby (because nodes beat ways when re-using) 797 797 if (!ctrl && currentMouseNode == null) { 798 List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive .isSelectablePredicate);798 List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive::isSelectable); 799 799 for (WaySegment ws : wss) { 800 800 mouseOnExistingWays.add(ws.way); … … 1088 1088 // This happens when nothing is selected, but we still want to highlight the "target node" 1089 1089 if (mouseOnExistingNode == null && getLayerManager().getEditDataSet().selectionEmpty() && mousePos != null) { 1090 mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive .isSelectablePredicate);1090 mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive::isSelectable); 1091 1091 } 1092 1092 -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r10463 r10716 391 391 updateKeyModifiers(e); 392 392 393 selectedNode = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive .isSelectablePredicate);394 selectedSegment = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive .isSelectablePredicate);393 selectedNode = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive::isSelectable); 394 selectedSegment = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive::isSelectable); 395 395 396 396 // If nothing gets caught, stay in select mode … … 570 570 private static void addNewNode(MouseEvent e) { 571 571 // Should maybe do the same as in DrawAction and fetch all nearby segments? 572 WaySegment ws = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive .isSelectablePredicate);572 WaySegment ws = Main.map.mapView.getNearestWaySegment(e.getPoint(), OsmPrimitive::isSelectable); 573 573 if (ws != null) { 574 574 Node n = new Node(Main.map.mapView.getLatLon(e.getX(), e.getY())); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java
r8590 r10716 41 41 } 42 42 43 Node node = mv.getNearestNode(p, OsmPrimitive .isSelectablePredicate);43 Node node = mv.getNearestNode(p, OsmPrimitive::isSelectable); 44 44 Way candidate = null; 45 45 … … 57 57 } 58 58 59 return Main.map.mapView.getNearestWay(p, OsmPrimitive .isSelectablePredicate);59 return Main.map.mapView.getNearestWay(p, OsmPrimitive::isSelectable); 60 60 } 61 61 -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r10463 r10716 321 321 if (!mouseHasBeenDragged) { 322 322 // use point from press or click event? (or are these always the same) 323 Way nearestWay = mv.getNearestWay(e.getPoint(), OsmPrimitive .isSelectablePredicate);323 Way nearestWay = mv.getNearestWay(e.getPoint(), OsmPrimitive::isSelectable); 324 324 if (nearestWay == null) { 325 325 if (matchesCurrentModifiers(setSelectedModifierCombo)) { … … 522 522 // TODO: rename 523 523 private boolean initParallelWays(Point p, boolean copyTags) { 524 referenceSegment = mv.getNearestWaySegment(p, Way.isUsablePredicate, true);524 referenceSegment = mv.getNearestWaySegment(p, OsmPrimitive::isUsable, true); 525 525 if (referenceSegment == null) 526 526 return false; -
trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
r9971 r10716 27 27 // Diamond operator does not work with Java 9 here 28 28 return new SubclassFilteredCollection<OsmPrimitive, Relation>( 29 primitives, OsmPrimitive.relationPredicate);29 primitives, Relation.class::isInstance); 30 30 } 31 31 } -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java
r10657 r10716 11 11 12 12 import org.openstreetmap.josm.Main; 13 import org.openstreetmap.josm.data.osm.OsmPrimitive;14 13 import org.openstreetmap.josm.data.osm.Tag; 15 14 import org.openstreetmap.josm.data.osm.TagCollection; … … 55 54 for (Map.Entry<String, String> entry : way.getKeys().entrySet()) { 56 55 final Tag tag = new Tag(entry.getKey(), entry.getValue()); 57 final boolean isDirectional = directionalTags.contains(tag) || OsmPrimitive.directionalKeyPredicate.test(tag);56 final boolean isDirectional = directionalTags.contains(tag) || tag.isDirectionKey(); 58 57 if (isDirectional) { 59 58 final boolean cannotBeCorrected = ReverseWayTagCorrector.getTagCorrections(tag).isEmpty(); -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r10715 r10716 329 329 */ 330 330 public Collection<Node> getNodes() { 331 return getPrimitives( OsmPrimitive.nodePredicate);331 return getPrimitives(Node.class::isInstance); 332 332 } 333 333 … … 371 371 */ 372 372 public Collection<Way> getWays() { 373 return getPrimitives( OsmPrimitive.wayPredicate);373 return getPrimitives(Way.class::isInstance); 374 374 } 375 375 … … 411 411 */ 412 412 public Collection<Relation> getRelations() { 413 return getPrimitives( OsmPrimitive.relationPredicate);413 return getPrimitives(Relation.class::isInstance); 414 414 } 415 415 … … 466 466 */ 467 467 public Collection<OsmPrimitive> allNonDeletedPrimitives() { 468 return getPrimitives( OsmPrimitive.nonDeletedPredicate);468 return getPrimitives(p -> !p.isDeleted()); 469 469 } 470 470 … … 476 476 */ 477 477 public Collection<OsmPrimitive> allNonDeletedCompletePrimitives() { 478 return getPrimitives( OsmPrimitive.nonDeletedCompletePredicate);478 return getPrimitives(primitive -> !primitive.isDeleted() && !primitive.isIncomplete()); 479 479 } 480 480 … … 486 486 */ 487 487 public Collection<OsmPrimitive> allNonDeletedPhysicalPrimitives() { 488 return getPrimitives( OsmPrimitive.nonDeletedPhysicalPredicate);488 return getPrimitives(primitive -> !primitive.isDeleted() && !primitive.isIncomplete() && !(primitive instanceof Relation)); 489 489 } 490 490 … … 495 495 */ 496 496 public Collection<OsmPrimitive> allModifiedPrimitives() { 497 return getPrimitives(OsmPrimitive .modifiedPredicate);497 return getPrimitives(OsmPrimitive::isModified); 498 498 } 499 499 … … 643 643 */ 644 644 public Collection<OsmPrimitive> getSelected() { 645 return new SubclassFilteredCollection<>(getAllSelected(), OsmPrimitive.nonDeletedPredicate);645 return new SubclassFilteredCollection<>(getAllSelected(), p -> !p.isDeleted()); 646 646 } 647 647 … … 668 668 */ 669 669 public Collection<Node> getSelectedNodes() { 670 return new SubclassFilteredCollection<>(getSelected(), OsmPrimitive.nodePredicate);670 return new SubclassFilteredCollection<>(getSelected(), Node.class::isInstance); 671 671 } 672 672 … … 676 676 */ 677 677 public Collection<Way> getSelectedWays() { 678 return new SubclassFilteredCollection<>(getSelected(), OsmPrimitive.wayPredicate);678 return new SubclassFilteredCollection<>(getSelected(), Way.class::isInstance); 679 679 } 680 680 … … 684 684 */ 685 685 public Collection<Relation> getSelectedRelations() { 686 return new SubclassFilteredCollection<>(getSelected(), OsmPrimitive.relationPredicate);686 return new SubclassFilteredCollection<>(getSelected(), Relation.class::isInstance); 687 687 } 688 688 -
trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java
r9348 r10716 207 207 boolean isExplicit = false; 208 208 for (Relation r : new SubclassFilteredCollection<OsmPrimitive, Relation>( 209 primitive.getReferrers(), OsmPrimitive .multipolygonPredicate)) {209 primitive.getReferrers(), OsmPrimitive::isMultipolygon)) { 210 210 if (!isFiltered(r, hidden)) 211 211 return false; … … 217 217 private static boolean oneParentMultipolygonNotFiltered(OsmPrimitive primitive, boolean hidden) { 218 218 for (Relation r : new SubclassFilteredCollection<OsmPrimitive, Relation>( 219 primitive.getReferrers(), OsmPrimitive .multipolygonPredicate)) {219 primitive.getReferrers(), OsmPrimitive::isMultipolygon)) { 220 220 if (!isFiltered(r, hidden)) 221 221 return true; -
trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java
r10657 r10716 32 32 boolean changed; 33 33 // first relations, then ways and nodes last; this is required to resolve dependencies 34 changed = doExecuteFilters(SubclassFilteredCollection.filter(all, OsmPrimitive.relationPredicate), filterMatcher);35 changed |= doExecuteFilters(SubclassFilteredCollection.filter(all, OsmPrimitive.wayPredicate), filterMatcher);36 changed |= doExecuteFilters(SubclassFilteredCollection.filter(all, OsmPrimitive.nodePredicate), filterMatcher);34 changed = doExecuteFilters(SubclassFilteredCollection.filter(all, Relation.class::isInstance), filterMatcher); 35 changed |= doExecuteFilters(SubclassFilteredCollection.filter(all, Way.class::isInstance), filterMatcher); 36 changed |= doExecuteFilters(SubclassFilteredCollection.filter(all, Node.class::isInstance), filterMatcher); 37 37 return changed; 38 38 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r10715 r10716 113 113 * @see #FLAG_HAS_DIRECTIONS 114 114 */ 115 privatestatic volatile Match directionKeys;115 static volatile Match directionKeys; 116 116 117 117 /** … … 200 200 * A predicate that filters primitives that are usable. 201 201 * @see OsmPrimitive#isUsable() 202 */ 203 public static final Predicate<OsmPrimitive> isUsablePredicate = primitive -> primitive.isUsable(); 202 * @deprecated Use {@code OsmPrimitive::isUsable} instead 203 */ 204 @Deprecated 205 public static final Predicate<OsmPrimitive> isUsablePredicate = OsmPrimitive::isUsable; 204 206 205 207 /** 206 208 * A predicate filtering primitives that are selectable. 207 */ 208 public static final Predicate<OsmPrimitive> isSelectablePredicate = primitive -> primitive.isSelectable(); 209 * @deprecated Use {@code OsmPrimitive::isSelectable} instead 210 */ 211 @Deprecated 212 public static final Predicate<OsmPrimitive> isSelectablePredicate = OsmPrimitive::isSelectable; 209 213 210 214 /** 211 215 * A predicate filtering primitives that are not deleted. 212 */ 213 public static final Predicate<OsmPrimitive> nonDeletedPredicate = primitive -> !primitive.isDeleted(); 216 * @deprecated Use {@code p -> !p.isDeleted()} instead 217 */ 218 @Deprecated 219 public static final Predicate<OsmPrimitive> nonDeletedPredicate = p -> !p.isDeleted(); 214 220 215 221 /** 216 222 * A predicate filtering primitives that are not deleted and not incomplete. 217 223 */ 224 @Deprecated 218 225 public static final Predicate<OsmPrimitive> nonDeletedCompletePredicate = 219 226 primitive -> !primitive.isDeleted() && !primitive.isIncomplete(); … … 222 229 * A predicate filtering primitives that are not deleted and not incomplete and that are not a relation. 223 230 */ 231 @Deprecated 224 232 public static final Predicate<OsmPrimitive> nonDeletedPhysicalPredicate = 225 233 primitive -> !primitive.isDeleted() && !primitive.isIncomplete() && !(primitive instanceof Relation); … … 227 235 /** 228 236 * A predicate filtering primitives that are modified 229 */ 230 public static final Predicate<OsmPrimitive> modifiedPredicate = primitive -> primitive.isModified(); 237 * @deprecated Use {@code OsmPrimitive::isModified} instead 238 */ 239 @Deprecated 240 public static final Predicate<OsmPrimitive> modifiedPredicate = OsmPrimitive::isModified; 231 241 232 242 /** 233 243 * A predicate filtering nodes. 234 */ 244 * @deprecated Use {@code Node.class::isInstance} instead 245 */ 246 @Deprecated 235 247 public static final Predicate<OsmPrimitive> nodePredicate = Node.class::isInstance; 236 248 237 249 /** 238 250 * A predicate filtering ways. 239 */ 251 * @deprecated Use {@code Way.class::isInstance} instead 252 */ 253 @Deprecated 240 254 public static final Predicate<OsmPrimitive> wayPredicate = Way.class::isInstance; 241 255 242 256 /** 243 257 * A predicate filtering relations. 244 */ 258 * @deprecated Use {@code Relation.class::isInstance} instead 259 */ 260 @Deprecated 245 261 public static final Predicate<OsmPrimitive> relationPredicate = Relation.class::isInstance; 246 262 247 263 /** 248 264 * A predicate filtering multipolygon relations. 249 */ 250 public static final Predicate<OsmPrimitive> multipolygonPredicate = 251 primitive -> primitive.getClass() == Relation.class && ((Relation) primitive).isMultipolygon(); 265 * @deprecated Use {@code OsmPrimitive::isMultipolygon} instead 266 */ 267 @Deprecated 268 public static final Predicate<OsmPrimitive> multipolygonPredicate = OsmPrimitive::isMultipolygon; 252 269 253 270 /** … … 256 273 * @see #FLAG_HAS_DIRECTIONS 257 274 */ 275 @Deprecated 258 276 public static final Predicate<Tag> directionalKeyPredicate = directionKeys::match; 259 277 … … 1452 1470 */ 1453 1471 public abstract boolean isOutsideDownloadArea(); 1472 1473 /** 1474 * Determines if this object is a relation and behaves as a multipolygon. 1475 * @return {@code true} if it is a real mutlipolygon or a boundary relation 1476 * @since 10716 1477 */ 1478 public boolean isMultipolygon() { 1479 return false; 1480 } 1454 1481 } -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r10689 r10716 422 422 } 423 423 424 /** 425 * Determines if this relation behaves as a multipolygon. 426 * @return {@code true} if it's a real mutlipolygon or a boundary relation 427 */ 424 @Override 428 425 public boolean isMultipolygon() { 429 426 return "multipolygon".equals(get("type")) || isBoundary(); -
trunk/src/org/openstreetmap/josm/data/osm/Tag.java
r9678 r10716 209 209 throw new UnsupportedOperationException(); 210 210 } 211 212 /** 213 * true if this is a direction dependent tag (e.g. oneway) 214 * 215 * @return {@code true} if this is is a direction dependent tag 216 * @since 10716 217 */ 218 public boolean isDirectionKey() { 219 return OsmPrimitive.directionKeys.match(this); 220 } 221 211 222 } -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r10657 r10716 2 2 package org.openstreetmap.josm.gui; 3 3 4 import static org.openstreetmap.josm.data.osm.OsmPrimitive.isSelectablePredicate;5 import static org.openstreetmap.josm.data.osm.OsmPrimitive.isUsablePredicate;6 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 7 5 import static org.openstreetmap.josm.tools.I18n.marktr; … … 293 291 // display them if the middle mouse button is pressed and keep them until the mouse is moved 294 292 if (middleMouseDown || isAtOldPosition) { 295 Collection<OsmPrimitive> osms = mv.getAllNearest(ms.mousePos, 296 o -> isUsablePredicate.test(o) && isSelectablePredicate.test(o)); 293 Collection<OsmPrimitive> osms = mv.getAllNearest(ms.mousePos, OsmPrimitive::isSelectable); 297 294 298 295 final JPanel c = new JPanel(new GridBagLayout()); … … 441 438 */ 442 439 private void statusBarElementUpdate(MouseState ms) { 443 final OsmPrimitive osmNearest = mv.getNearestNodeOrWay(ms.mousePos, isUsablePredicate, false);440 final OsmPrimitive osmNearest = mv.getNearestNodeOrWay(ms.mousePos, OsmPrimitive::isUsable, false); 444 441 if (osmNearest != null) { 445 442 nameText.setText(osmNearest.getDisplayName(DefaultNameFormatter.getInstance())); -
trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
r10661 r10716 387 387 if (clicked) { 388 388 Point center = new Point(selectionResult.xpoints[0], selectionResult.ypoints[0]); 389 OsmPrimitive osm = nc.getNearestNodeOrWay(center, OsmPrimitive .isSelectablePredicate, false);389 OsmPrimitive osm = nc.getNearestNodeOrWay(center, OsmPrimitive::isSelectable, false); 390 390 if (osm != null) { 391 391 selection.add(osm); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
r10657 r10716 20 20 import org.openstreetmap.josm.command.ChangeCommand; 21 21 import org.openstreetmap.josm.command.Command; 22 import org.openstreetmap.josm.data.osm.Node; 22 23 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 24 import org.openstreetmap.josm.data.osm.Relation; … … 199 200 public void prepareDefaultRelationDecisions() { 200 201 201 if (primitives.stream().allMatch( OsmPrimitive.nodePredicate)) {202 if (primitives.stream().allMatch(Node.class::isInstance)) { 202 203 final Collection<OsmPrimitive> primitivesInDecisions = new HashSet<>(); 203 204 for (final RelationMemberConflictDecision i : decisions) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r10619 r10716 628 628 } 629 629 Main.map.statusLine.setDist( 630 new SubclassFilteredCollection<OsmPrimitive, Way>(selection, OsmPrimitive.wayPredicate));630 new SubclassFilteredCollection<OsmPrimitive, Way>(selection, Way.class::isInstance)); 631 631 } 632 632 } -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r10626 r10716 425 425 426 426 @Override public String getToolTipText() { 427 int nodes = new FilteredCollection<>(data.getNodes(), OsmPrimitive.nonDeletedPredicate).size();428 int ways = new FilteredCollection<>(data.getWays(), OsmPrimitive.nonDeletedPredicate).size();429 int rels = new FilteredCollection<>(data.getRelations(), OsmPrimitive.nonDeletedPredicate).size();427 int nodes = new FilteredCollection<>(data.getNodes(), p -> !p.isDeleted()).size(); 428 int ways = new FilteredCollection<>(data.getWays(), p -> !p.isDeleted()).size(); 429 int rels = new FilteredCollection<>(data.getRelations(), p -> !p.isDeleted()).size(); 430 430 431 431 String tool = trn("{0} node", "{0} nodes", nodes, nodes)+", "; -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r10615 r10716 86 86 if (Main.isDisplayingMapView()) { 87 87 Point p = Main.map.mapView.getPoint(ll); 88 node = Main.map.mapView.getNearestNode(p, OsmPrimitive .isUsablePredicate);88 node = Main.map.mapView.getNearestNode(p, OsmPrimitive::isUsable); 89 89 if (node != null && node.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remotecontrol.tolerance", 0.1)) { 90 90 node = null; // node is too far -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r10615 r10716 127 127 if (Main.isDisplayingMapView()) { 128 128 Point p = Main.map.mapView.getPoint(ll); 129 nd = Main.map.mapView.getNearestNode(p, OsmPrimitive .isUsablePredicate);129 nd = Main.map.mapView.getNearestNode(p, OsmPrimitive::isUsable); 130 130 if (nd != null && nd.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remote.tolerance", 0.1)) { 131 131 nd = null; // node is too far
Note:
See TracChangeset
for help on using the changeset viewer.