diff --git a/src/org/openstreetmap/josm/data/UndoRedoHandler.java b/src/org/openstreetmap/josm/data/UndoRedoHandler.java
index fb7ef80..fd3874c 100644
--- a/src/org/openstreetmap/josm/data/UndoRedoHandler.java
+++ b/src/org/openstreetmap/josm/data/UndoRedoHandler.java
@@ -65,7 +65,6 @@ public class UndoRedoHandler implements MapView.LayerChangeListener {
     public void undo() {
         if (commands.isEmpty())
             return;
-        Collection<? extends OsmPrimitive> oldSelection = Main.main.getCurrentDataSet().getSelected();
         final Command c = commands.removeLast();
         c.undoCommand();
         redoCommands.push(c);
@@ -74,10 +73,9 @@ public class UndoRedoHandler implements MapView.LayerChangeListener {
             data.fireDataChange();
         }
         fireCommandsChanged();
-        Collection<? extends OsmPrimitive> newSelection = Main.main.getCurrentDataSet().getSelected();
-        if (!oldSelection.equals(newSelection)) {
-            Main.main.getCurrentDataSet().fireSelectionChanged();
-        }
+        // the undo may have changed the selection or modify selected items
+        // so tell the listeners about the current situation
+        Main.main.getCurrentDataSet().fireSelectionChanged();
     }
 
     /**
@@ -87,7 +85,6 @@ public class UndoRedoHandler implements MapView.LayerChangeListener {
     public void redo() {
         if (redoCommands.isEmpty())
             return;
-        Collection<? extends OsmPrimitive> oldSelection = Main.main.getCurrentDataSet().getSelected();
         final Command c = redoCommands.pop();
         c.executeCommand();
         commands.add(c);
@@ -96,10 +93,9 @@ public class UndoRedoHandler implements MapView.LayerChangeListener {
             data.fireDataChange();
         }
         fireCommandsChanged();
-        Collection<? extends OsmPrimitive> newSelection = Main.main.getCurrentDataSet().getSelected();
-        if (!oldSelection.equals(newSelection)) {
-            Main.main.getCurrentDataSet().fireSelectionChanged();
-        }
+        // the redo may have changed the selection or modify selected items
+        // so tell the listeners about the current situation
+        Main.main.getCurrentDataSet().fireSelectionChanged();
     }
 
     public void fireCommandsChanged() {
