- Timestamp:
- 2010-02-21T13:22:06+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r2990 r3033 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.util.ArrayList; 5 6 import java.util.Collection; 6 7 import java.util.HashMap; … … 216 217 throw new IllegalStateException(tr("Missing merge target for way with id {0}", source.getUniqueId())); 217 218 218 List<Node> newNodes = new LinkedList<Node>();219 List<Node> newNodes = new ArrayList<Node>(source.getNodesCount()); 219 220 for (Node sourceNode : source.getNodes()) { 220 221 Node targetNode = (Node)getMergeTarget(sourceNode); … … 222 223 if (targetNode.isVisible()) { 223 224 newNodes.add(targetNode); 225 if (targetNode.isDeleted() && !conflicts.hasConflictForMy(targetNode)) { 226 conflicts.add(targetNode, sourceNode); 227 } 224 228 } else { 225 229 target.setModified(true); … … 250 254 RelationMember newMember = new RelationMember(sourceMember.getRole(), targetMember); 251 255 newMembers.add(newMember); 256 if (targetMember.isDeleted() && !conflicts.hasConflictForMy(targetMember)) { 257 conflicts.add(targetMember, sourceMember.getMember()); 258 } 252 259 } else { 253 260 target.setModified(true); … … 309 316 // otherwise too many conflicts when refreshing from the server 310 317 // but, if source has a referrer that is not in the target dataset there is a conflict 318 // If target dataset refers to the deleted primitive, conflict will be added in fixReferences method 311 319 for (OsmPrimitive referrer: source.getReferrers()) { 312 320 if (targetDataSet.getPrimitiveById(referrer.getPrimitiveId()) == null) {
Note:
See TracChangeset
for help on using the changeset viewer.