Changeset 35629 in osm for applications
- Timestamp:
- 2020-10-29T00:14:23+01:00 (4 years ago)
- Location:
- applications/editors/josm/plugins/comfort0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/comfort0/src/net/simon04/comfort0/EditLevel0LAction.java
r35628 r35629 30 30 import org.openstreetmap.josm.data.osm.PrimitiveData; 31 31 import org.openstreetmap.josm.data.osm.RelationData; 32 import org.openstreetmap.josm.data.osm.TagMap; 32 33 import org.openstreetmap.josm.data.osm.WayData; 33 34 import org.openstreetmap.josm.gui.MainApplication; … … 137 138 newInstance.load(fromLevel0L); 138 139 139 final boolean equalKeys = Objects.equals(newInstance.getKeys(), fromDataSet.getKeys()); 140 if (!equalKeys) { 141 final ChangePropertyCommand command = new ChangePropertyCommand(Collections.singleton(fromDataSet), newInstance.getKeys()); 140 final TagMap newKeys = newInstance.getKeys(); 141 if (!Objects.equals(newKeys, fromDataSet.getKeys())) { 142 fromDataSet.getKeys().keySet().forEach(key -> 143 newKeys.computeIfAbsent(key, k -> "")); 144 final ChangePropertyCommand command = new ChangePropertyCommand(Collections.singleton(fromDataSet), newKeys); 142 145 commands.add(command); 143 146 } -
applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/EditLevel0LActionTest.java
r35628 r35629 69 69 node.put("fixme", "delete me!"); 70 70 command = buildChangeCommand(dataSet, ChangePropertyCommand.class); 71 assertThat(command.getTags(), is(new TagMap("name", "Neu Broderstorf", "traffic_sign", "city_limit" )));71 assertThat(command.getTags(), is(new TagMap("name", "Neu Broderstorf", "traffic_sign", "city_limit", "fixme", ""))); 72 72 node.remove("fixme"); 73 73
Note:
See TracChangeset
for help on using the changeset viewer.