Changeset 8850 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
- Timestamp:
- 2015-10-10T15:15:14+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
r8836 r8850 253 253 long idToKeep = 0; 254 254 Way wayToKeep = ways.iterator().next(); 255 // Only one way will be kept - the one with lowest positive ID, if such exist256 // or one "at random" if no such exists. Rest of the ways will be deleted257 for (Way w: ways) {258 if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) {259 idToKeep = w.getId();260 wayToKeep = w;261 }262 }263 264 255 // Find the way that is member of one or more relations. (If any) 265 256 Way wayWithRelations = null; … … 273 264 relations = rel; 274 265 } 266 // Only one way will be kept - the one with lowest positive ID, if such exist 267 // or one "at random" if no such exists. Rest of the ways will be deleted 268 if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) { 269 idToKeep = w.getId(); 270 wayToKeep = w; 271 } 275 272 } 276 273
Note:
See TracChangeset
for help on using the changeset viewer.