Ignore:
Timestamp:
2015-06-19T19:20:50+02:00 (11 years ago)
Author:
simon04
Message:

fix #11150 - False validator warning on ford if node is outside the downloaded area and highway or waterway is not loaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r8494 r8495  
    1313
    1414import org.openstreetmap.josm.Main;
     15import org.openstreetmap.josm.actions.search.SearchCompiler;
    1516import org.openstreetmap.josm.data.osm.Node;
    1617import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    467468                    !MultipolygonCache.getInstance().get(Main.map.mapView, (Relation) e.osm).getOpenEnds().isEmpty();
    468469        }
     470
     471        private static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new SearchCompiler.InDataSourceArea(false);
     472
     473        /**
     474         * {@code in-downloaded-area} tests whether the object is within source area ("downloaded area").
     475         * @see SearchCompiler.InDataSourceArea
     476         */
     477        static boolean inDownloadedArea(Environment e) {
     478            return IN_DOWNLOADED_AREA.evaluate(e.osm);
     479        }
     480
    469481    }
    470482
Note: See TracChangeset for help on using the changeset viewer.