Changeset 2623 in osm for applications/editors/josm
- Timestamp:
- 2007-04-22T14:56:56+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/OrphanSegment.java
r2591 r2623 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.util.HashSet; 6 import java.util.Set; 5 import java.util.*; 7 6 8 import org.openstreetmap.josm. data.osm.Segment;9 import org.openstreetmap.josm.data.osm. Way;7 import org.openstreetmap.josm.Main; 8 import org.openstreetmap.josm.data.osm.*; 10 9 import org.openstreetmap.josm.plugins.validator.Severity; 11 10 import org.openstreetmap.josm.plugins.validator.Test; … … 48 47 } 49 48 49 @Override 50 public void visit(Collection<OsmPrimitive> selection) 51 { 52 // If there is a partial selection, it may be false positives if a 53 // segment is selected, but not the container way. So, in this 54 // case, we must visit all ways, selected or not. 55 56 for (OsmPrimitive p : selection) 57 { 58 if( !p.deleted ) 59 { 60 if( !partialSelection || p instanceof Segment ) 61 p.visit(this); 62 } 63 } 64 65 if( partialSelection ) 66 { 67 for( Way w : Main.ds.ways) 68 visit(w); 69 } 70 } 71 50 72 @Override 51 73 public void visit(Segment s) 52 74 { 75 53 76 segments.add(s); 54 77 }
Note:
See TracChangeset
for help on using the changeset viewer.