Changeset 16444 in josm


Ignore:
Timestamp:
2020-05-17T17:02:23+02:00 (3 weeks ago)
Author:
simon04
Message:

see #19251 - Fix NavigatableComponent.getAllNearest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r16438 r16444  
    16081608
    16091609        // add parent relations of nearby nodes and ways
    1610         nearestList.stream()
    1611                 .flatMap(o -> o.getReferrers().stream())
    1612                 .filter(r -> r instanceof Relation && predicate.test(r))
    1613                 .forEach(nearestList::add);
     1610        Set<OsmPrimitive> parentRelations = nearestList.stream()
     1611                .flatMap(o -> o.referrers(Relation.class))
     1612                .filter(predicate)
     1613                .collect(Collectors.toSet());
     1614        nearestList.addAll(parentRelations);
    16141615
    16151616        if (ignore != null) {
Note: See TracChangeset for help on using the changeset viewer.