Ignore:
Timestamp:
2016-01-31T11:28:22+01:00 (4 years ago)
Author:
simon04
Message:

fix #12464 see #12464 - Regression: Validator did not longer warn about nodes without tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r9397 r9693  
    14251425        }
    14261426
    1427         protected abstract Collection<Bounds> getBounds();
     1427        protected abstract Collection<Bounds> getBounds(OsmPrimitive primitive);
    14281428
    14291429        @Override
     
    14321432                return false;
    14331433            else if (osm instanceof Node) {
    1434                 Collection<Bounds> allBounds = getBounds();
     1434                Collection<Bounds> allBounds = getBounds(osm);
    14351435                if (allBounds != null) {
    14361436                    LatLon coor = ((Node) osm).getCoor();
     
    14671467
    14681468        @Override
    1469         protected Collection<Bounds> getBounds() {
    1470             return Main.main == null || Main.main.getCurrentDataSet() == null || Main.main.getCurrentDataSet().getDataSourceArea() == null
    1471                     ? null : Main.main.getCurrentDataSet().getDataSourceBounds();
     1469        protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
     1470            return primitive.getDataSet() != null ? primitive.getDataSet().getDataSourceBounds() : null;
    14721471        }
    14731472
     
    14801479    /**
    14811480     * Matches objects which are not outside the source area ("downloaded area").
    1482      * Unlink {@link InDataSourceArea} this matches also if no source area is set (e.g., for new layers).
     1481     * Unlike {@link InDataSourceArea} this matches also if no source area is set (e.g., for new layers).
    14831482     */
    14841483    public static class NotOutsideDataSourceArea extends InDataSourceArea {
     
    14921491
    14931492        @Override
    1494         protected Collection<Bounds> getBounds() {
    1495             final Collection<Bounds> bounds = super.getBounds();
     1493        protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
     1494            final Collection<Bounds> bounds = super.getBounds(primitive);
    14961495            return bounds == null || bounds.isEmpty() ? Collections.singleton(Main.getProjection().getWorldBoundsLatLon()) : bounds;
    14971496        }
     
    15131512
    15141513        @Override
    1515         protected Collection<Bounds> getBounds() {
     1514        protected Collection<Bounds> getBounds(OsmPrimitive primitive) {
    15161515            if (!Main.isDisplayingMapView()) {
    15171516                return null;
Note: See TracChangeset for help on using the changeset viewer.