Changeset 8829 in josm for trunk


Ignore:
Timestamp:
2015-10-05T22:49:24+02:00 (9 years ago)
Author:
simon04
Message:

fix #10134 - Validator: allow to cancel validation tests

This especially applies to Tag checker (MapCSS based).

Location:
trunk/src/org/openstreetmap/josm/data/validation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/Test.java

    r8724 r8829  
    200200        }
    201201        for (OsmPrimitive p : selection) {
     202            if (isCanceled()) {
     203                break;
     204            }
    202205            if (isPrimitiveUsable(p)) {
    203206                p.accept(this);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java

    r8743 r8829  
    55import static org.openstreetmap.josm.tools.I18n.tr;
    66
    7 import java.util.Collection;
    87import java.util.Map;
    98
     
    3837        super(tr("Untagged and unconnected nodes"),
    3938                tr("This test checks for untagged nodes that are not part of any way."));
    40     }
    41 
    42     @Override
    43     public void visit(Collection<OsmPrimitive> selection) {
    44         for (OsmPrimitive p : selection) {
    45             if (p.isUsable() && p instanceof Node) {
    46                 p.accept(this);
    47             }
    48         }
    4939    }
    5040
Note: See TracChangeset for help on using the changeset viewer.