Changeset 8850 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.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/DuplicateRelation.java
r8836 r8850 243 243 long idToKeep = 0; 244 244 Relation relationToKeep = relFix.iterator().next(); 245 // Only one relation will be kept - the one with lowest positive ID, if such exist246 // or one "at random" if no such exists. Rest of the relations will be deleted247 for (Relation w: relFix) {248 if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) {249 idToKeep = w.getId();250 relationToKeep = w;251 }252 }253 254 245 // Find the relation that is member of one or more relations. (If any) 255 246 Relation relationWithRelations = null; … … 262 253 relationWithRelations = w; 263 254 relRef = rel; 255 } 256 // Only one relation will be kept - the one with lowest positive ID, if such exist 257 // or one "at random" if no such exists. Rest of the relations will be deleted 258 if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) { 259 idToKeep = w.getId(); 260 relationToKeep = w; 264 261 } 265 262 }
Note:
See TracChangeset
for help on using the changeset viewer.