Changeset 2935 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2010-02-04T15:34:15+01:00 (15 years ago)
Author:
mjulius
Message:

fixes #4476 - Deleted nodes cause an conflict if the data is redownloaded
Now, the conflict is only created if the referrer is not already part of the target dataset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r2933 r2935  
    306306            // same version, but target is deleted. Assume target takes precedence
    307307            // otherwise too many conflicts when refreshing from the server
    308             // but, if source has referrers there is a conflict
    309             if (!source.getReferrers().isEmpty()) {
    310                 conflicts.add(target, source);
     308            // but, if source has a referrer that is not in the target dataset there is a conflict
     309            for (OsmPrimitive referrer: source.getReferrers()) {
     310                if (targetDataSet.getPrimitiveById(referrer.getPrimitiveId()) == null) {
     311                    conflicts.add(target, source);
     312                    break;
     313                }
    311314            }
    312315        } else if (target.isDeleted() != source.isDeleted()) {
Note: See TracChangeset for help on using the changeset viewer.