Changeset 5350 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-07-19T00:52:15+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r5298 r5350 188 188 List<OsmPrimitive> referrers = target.getReferrers(); 189 189 if (referrers.isEmpty()) { 190 resetPrimitive(target); 191 target.mergeFrom(source); 190 192 target.setDeleted(true); 191 target.mergeFrom(source);192 193 it.remove(); 193 194 flag = true; … … 212 213 // This can be because of cross-referenced relations. 213 214 for (OsmPrimitive osm: objectsToDelete) { 214 if (osm instanceof Way) { 215 ((Way) osm).setNodes(null); 216 } else if (osm instanceof Relation) { 217 ((Relation) osm).setMembers(null); 218 } 215 resetPrimitive(osm); 219 216 } 220 217 for (OsmPrimitive osm: objectsToDelete) { … … 222 219 osm.mergeFrom(sourceDataSet.getPrimitiveById(osm.getPrimitiveId())); 223 220 } 221 } 222 } 223 224 private final void resetPrimitive(OsmPrimitive osm) { 225 if (osm instanceof Way) { 226 ((Way) osm).setNodes(null); 227 } else if (osm instanceof Relation) { 228 ((Relation) osm).setMembers(null); 224 229 } 225 230 }
Note:
See TracChangeset
for help on using the changeset viewer.