Changeset 17761 in josm


Ignore:
Timestamp:
2021-04-12T21:33:48+02:00 (4 years ago)
Author:
GerdP
Message:

see #20729:Alert user if validation action is performed with data filters enabled

  • replace isDrawable() by more appropriate methods to make results of validator independent of filter settings

TODO: use MultipolygonCache.get() instead of new Multipolygon() in more places to improve performance.

Location:
trunk/src/org/openstreetmap/josm/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r16445 r17761  
    514514            if (m.getMember().isIncomplete()) {
    515515                this.incomplete = true;
    516             } else if (m.getMember().isDrawable() && m.isWay()) {
     516            } else if (!m.getMember().isDeleted() && m.isWay()) {
    517517                Way w = m.getWay();
    518518
    519                 if (w.getNodesCount() < 2) {
     519                if (!w.hasOnlyLocatableNodes() || w.getNodesCount() < 2) {
    520520                    continue;
    521521                }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/LongSegment.java

    r17382 r17761  
    136136    private static boolean isUsableNode(OsmPrimitive p) {
    137137        // test changed nodes - ways referred by them may not be checked automatically.
    138         return p instanceof Node && p.isDrawable();
     138        return p instanceof Node && ((Node) p).isLatLonKnown();
    139139    }
    140140
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

    r17420 r17761  
    595595            Node a = w.getNode(i-1);
    596596            Node b = w.getNode(i);
    597             if (a.isDrawable() && b.isDrawable()) {
     597            if (a.isLatLonKnown() && b.isLatLonKnown()) {
    598598                MyWaySegment ws = new MyWaySegment(w, a, b, concersArea);
    599599                ret.add(ws);
Note: See TracChangeset for help on using the changeset viewer.