Changeset 29971 in osm for applications


Ignore:
Timestamp:
2013-09-27T00:53:44+02:00 (11 years ago)
Author:
oliverw
Message:

[josm_fixadresses]: Fixes #josm9047 (unsolicited overwrite of tag values)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMEntityBase.java

    r25373 r29971  
    163163        protected void setOSMTag(String tag, String newValue) {
    164164                CheckParameterUtil.ensureParameterNotNull(tag, "tag");
    165                 if (StringUtils.isNullOrEmpty(tag)) return;
     165               
    166166
    167167                if (osmObject != null) {
     168                        String existingValue = osmObject.get(tag);
     169                        // Bugfix #9047: Keep existing values
     170                        if (!StringUtils.isNullOrEmpty(existingValue)) {
     171                            return;
     172                        }
     173                       
    168174                        if ((osmObject.hasKey(tag) && newValue == null) || newValue != null) {
    169175                                fireCommandIssued(new ChangePropertyCommand(osmObject, tag, newValue));
Note: See TracChangeset for help on using the changeset viewer.