Ignore:
Timestamp:
2017-10-03T21:31:04+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15387 - IAE occurs when pasting tags into relation editor using "Paste tags from buffer" (regression from #13036)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveTagTransferPaster.java

    r12769 r12920  
    88import java.util.Collection;
    99import java.util.EnumMap;
     10import java.util.HashMap;
    1011import java.util.List;
    1112import java.util.Map;
     
    5051        List<Command> commands = new ArrayList<>();
    5152        for (Tag tag : tagPaster.execute()) {
    52             ChangePropertyCommand cmd = new ChangePropertyCommand(selection, tag.getKey(), "".equals(tag.getValue()) ? null : tag.getValue());
     53            Map<String, String> tags = new HashMap<>(1);
     54            tags.put(tag.getKey(), "".equals(tag.getValue()) ? null : tag.getValue());
     55            ChangePropertyCommand cmd = new ChangePropertyCommand(Main.main.getEditDataSet(), selection, tags);
    5356            if (cmd.getObjectsNumber() > 0) {
    5457                commands.add(cmd);
Note: See TracChangeset for help on using the changeset viewer.