Index: /trunk/src/org/openstreetmap/josm/gui/MapMover.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapMover.java	(revision 5471)
+++ /trunk/src/org/openstreetmap/josm/gui/MapMover.java	(revision 5472)
@@ -15,9 +15,13 @@
 
 import javax.swing.AbstractAction;
+import javax.swing.ActionMap;
+import javax.swing.InputMap;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
+import javax.swing.KeyStroke;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.tools.Destroyable;
 import org.openstreetmap.josm.tools.PlatformHookOsx;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -29,5 +33,5 @@
  * @author imi
  */
-public class MapMover extends MouseAdapter implements MouseMotionListener, MouseWheelListener {
+public class MapMover extends MouseAdapter implements MouseMotionListener, MouseWheelListener, Destroyable {
 
     private final class ZoomerAction extends AbstractAction {
@@ -67,4 +71,5 @@
      */
     private final NavigatableComponent nc;
+    private final JPanel contentPane;
 
     private boolean movementInPlace = false;
@@ -75,4 +80,5 @@
     public MapMover(NavigatableComponent navComp, JPanel contentPane) {
         this.nc = navComp;
+        this.contentPane = contentPane;
         nc.addMouseListener(this);
         nc.addMouseMotionListener(this);
@@ -217,3 +223,27 @@
     }
 
+    @Override
+    public void destroy() {
+        if (this.contentPane != null) {
+            InputMap inputMap = contentPane.getInputMap();
+            KeyStroke[] inputKeys = inputMap.keys();
+            if (inputKeys != null) {
+                for (KeyStroke key : inputKeys) {
+                    Object binding = inputMap.get(key);
+                    if (binding instanceof String && ((String)binding).startsWith("MapMover.")) {
+                        inputMap.remove(key);
+                    }
+                }
+            }
+            ActionMap actionMap = contentPane.getActionMap();
+            Object[] actionsKeys = actionMap.keys();
+            if (actionsKeys != null) {
+                for (Object key : actionsKeys) {
+                    if (key instanceof String && ((String)key).startsWith("MapMover.")) {
+                        actionMap.remove(key);
+                    }
+                }
+            }
+        }
+    }
 }
Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 5471)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 5472)
@@ -215,4 +215,5 @@
     private boolean paintPreferencesChanged = true;
     private Rectangle lastClipBounds = new Rectangle();
+    private MapMover mapMover;
 
     /**
@@ -235,5 +236,5 @@
                 scaler.setLocation(10,30);
 
-                new MapMover(MapView.this, contentPane);
+                mapMover = new MapMover(MapView.this, contentPane);
                 OsmDataLayer layer = getEditLayer();
                 if (layer != null) {
@@ -887,4 +888,7 @@
         DataSet.removeSelectionListener(repaintSelectionChangedListener);
         MultipolygonCache.getInstance().clear(this);
+        if (mapMover != null) {
+            mapMover.destroy();
+        }
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5471)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5472)
@@ -7,4 +7,5 @@
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.awt.Container;
 import java.awt.Cursor;
 import java.awt.Dialog.ModalityType;
@@ -1678,4 +1679,8 @@
             action.destroy();
         }
+        Container parent = pluginHook.getParent();
+        if (parent != null) {
+            parent.remove(pluginHook);
+        }
     }
 }
