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


Ignore:
Timestamp:
2024-04-28T11:24:57+02:00 (9 months ago)
Author:
GerdP
Message:

fix #23641: When mapping a forest inside a forest and make that inner, the inner landuse=forest tag is removed.

  • change code so the tags of inner ways which are common to the multipolygon are not removed.
  • add unit test
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r18208 r19066  
    465465            String key = entry.getKey();
    466466            String value = entry.getValue();
    467             List<OsmPrimitive> affectedWays = innerWays.stream().filter(way -> value.equals(way.get(key))).collect(Collectors.toList());
     467            List<OsmPrimitive> affectedWays;
     468            if ("area".equals(key)) {
     469                affectedWays = innerWays.stream().filter(way -> value.equals(way.get(key))).collect(Collectors.toList());
     470            } else {
     471                affectedWays = new ArrayList<>();
     472            }
    468473
    469474            if (moveTags) {
Note: See TracChangeset for help on using the changeset viewer.