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


Ignore:
Timestamp:
2016-03-11T14:13:23+01:00 (9 years ago)
Author:
simon04
Message:

fix #12599 - Added/deleted "uninteresting" tags are "reverted" by downloading area again (unit test by Don-vip)

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

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

    r8870 r9961  
    357357            // target is same as source but target is modified
    358358            // => keep target and reset modified flag if target and source are semantically equal
    359             if (target.hasEqualSemanticAttributes(source)) {
     359            if (target.hasEqualSemanticAttributes(source, false)) {
    360360                target.setModified(false);
    361361            }
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r9941 r9961  
    12381238     */
    12391239    public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
     1240        return hasEqualSemanticAttributes(other, true);
     1241    }
     1242
     1243    boolean hasEqualSemanticAttributes(final OsmPrimitive other, final boolean testInterestingTagsOnly) {
    12401244        if (!isNew() &&  id != other.id)
    12411245            return false;
    12421246        if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159)
    12431247            return false;
    1244         // can't do an equals check on the internal keys array because it is not ordered
    1245         //
    1246         return hasSameInterestingTags(other);
     1248        return testInterestingTagsOnly ? hasSameInterestingTags(other) : getKeys().equals(other.getKeys());
    12471249    }
    12481250
Note: See TracChangeset for help on using the changeset viewer.