Changeset 12762 in josm


Ignore:
Timestamp:
2017-09-06T21:44:06+02:00 (3 weeks ago)
Author:
Don-vip
Message:

fix #15254 - see #13036 - do not create empty SequenceCommand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r12384 r12762  
    538538            for (String oldkey : prim.keySet()) {
    539539                if (!currentkeys.contains(oldkey)) {
    540                     ChangePropertyCommand deleteCommand =
    541                         new ChangePropertyCommand(prim, oldkey, null);
    542                     commands.add(deleteCommand);
     540                    commands.add(new ChangePropertyCommand(prim, oldkey, null));
    543541                }
    544542            }
    545543        }
    546544
    547         return new SequenceCommand(
     545        return commands.isEmpty() ? null : new SequenceCommand(
    548546                trn("Remove old keys from up to {0} object", "Remove old keys from up to {0} objects", primitives.size(), primitives.size()),
    549547                commands
Note: See TracChangeset for help on using the changeset viewer.