Changeset 5143 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2012-03-31T17:04:08+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r5077 r5143 114 114 115 115 for (OsmPrimitive osm : objects) { 116 boolean modified = false; 117 118 // loop over all tags 116 // loop over all tags 119 117 for (Map.Entry<String, String> tag : this.tags.entrySet()) { 120 118 String oldVal = osm.get(tag.getKey()); … … 122 120 123 121 if (newVal == null || newVal.isEmpty()) { 124 if (oldVal != null) {122 if (oldVal != null) 125 123 osm.remove(tag.getKey()); 126 modified = true;127 }128 124 } 129 125 else if (oldVal == null || !newVal.equals(oldVal)) 130 126 osm.put(tag.getKey(), newVal); 131 modified = true;132 }133 if (modified)134 127 } 128 // init() only keeps modified primitives. Therefore the modified 129 // bit can be set without further checks. 130 osm.setModified(true); 135 131 } 136 132 return true;
Note:
See TracChangeset
for help on using the changeset viewer.