Skip to content

Commit 0ba7d5a

Browse files
GerdPGerdP
GerdP
authored and
GerdP
committedMar 4, 2024·
fix #22814: Command stack shows "Set 1 tags for 0 objects"
- add check to avoid a no-change-command on the undo/redo stack git-svn-id: https://josm.openstreetmap.de/svn/trunk@19006 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent bcbfa72 commit 0ba7d5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

+2
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ public void performTagEdit() {
605605
}
606606
if (key.equals(newkey) && KeyedItem.DIFFERENT_I18N.equals(value))
607607
return;
608+
if (value != null && key.equals(getEditItem(keys)) && m.size() == 1 && m.containsKey(getEditItem(values)))
609+
return; // see #22814: avoid to create a command that wouldn't change anything
608610
if (key.equals(newkey) || value == null) {
609611
UndoRedoHandler.getInstance().add(new ChangePropertyCommand(sel, newkey, value));
610612
if (value != null) {

0 commit comments

Comments
 (0)
Please sign in to comment.