Index: trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 13009)
+++ trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 13010)
@@ -2,13 +2,10 @@
 package org.openstreetmap.josm.data;
 
-import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
-import java.util.Optional;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -93,16 +90,6 @@
      */
     public synchronized void add(final Command c) {
-        DataSet ds = Optional.ofNullable(c.getAffectedDataSet()).orElseGet(() -> Main.main.getEditDataSet());
-        Collection<? extends OsmPrimitive> oldSelection = null;
-        if (ds != null) {
-            oldSelection = ds.getSelected();
-        }
         addNoRedraw(c);
         afterAdd();
-
-        // the command may have changed the selection so tell the listeners about the current situation
-        if (ds != null) {
-            fireIfSelectionChanged(ds, oldSelection);
-        }
     }
 
@@ -122,7 +109,5 @@
             return;
         DataSet ds = Main.main.getEditDataSet();
-        Collection<? extends OsmPrimitive> oldSelection = null;
         if (ds != null) {
-            oldSelection = ds.getSelected();
             ds.beginUpdate();
         }
@@ -142,7 +127,4 @@
         }
         fireCommandsChanged();
-        if (ds != null) {
-            fireIfSelectionChanged(ds, oldSelection);
-        }
     }
 
@@ -161,6 +143,4 @@
         if (redoCommands.isEmpty())
             return;
-        DataSet ds = Main.main.getEditDataSet();
-        Collection<? extends OsmPrimitive> oldSelection = ds.getSelected();
         for (int i = 0; i < num; ++i) {
             final Command c = redoCommands.removeFirst();
@@ -172,12 +152,4 @@
         }
         fireCommandsChanged();
-        fireIfSelectionChanged(ds, oldSelection);
-    }
-
-    private static void fireIfSelectionChanged(DataSet ds, Collection<? extends OsmPrimitive> oldSelection) {
-        Collection<? extends OsmPrimitive> newSelection = ds.getSelected();
-        if (!oldSelection.equals(newSelection)) {
-            ds.fireSelectionChanged();
-        }
     }
 
