Changeset 12040 in josm
- Timestamp:
- 2017-05-03T00:00:50+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/LongSegment.java
r12037 r12040 127 127 @Override 128 128 public boolean isPrimitiveUsable(OsmPrimitive p) { 129 if (!p.isUsable()) {130 return false;131 } else if (p instanceof Way && ((Way) p).getNodesCount() > 1) { 132 // test only Ways with at least 2 nodes133 return true;134 } else if (p instanceof Node && p.isDrawable()) {135 // test all nodes - ways referred by them may not be checked automatically.136 return true; 137 } else{138 return false;139 }129 return p.isUsable() && (isUsableWay(p) || isUsableNode(p)); 130 } 131 132 private boolean isUsableNode(OsmPrimitive p) { 133 // test changed nodes - ways referred by them may not be checked automatically. 134 return p instanceof Node && p.isDrawable(); 135 } 136 137 private boolean isUsableWay(OsmPrimitive p) { 138 // test only Ways with at least 2 nodes 139 return p instanceof Way && ((Way) p).getNodesCount() > 1; 140 140 } 141 141 }
Note:
See TracChangeset
for help on using the changeset viewer.