Index: trunk/src/org/openstreetmap/josm/actions/relation/RecentRelationsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/RecentRelationsAction.java	(revision 11609)
+++ trunk/src/org/openstreetmap/josm/actions/relation/RecentRelationsAction.java	(revision 11610)
@@ -19,14 +19,9 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.gui.DefaultNameFormatter;
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.layer.Layer;
-import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
-import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
-import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
-import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
-import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
-import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener;
@@ -36,10 +31,12 @@
 /**
  * Action for accessing recent relations.
+ * @since 9668
  */
-public class RecentRelationsAction implements ActionListener, CommandQueueListener, LayerChangeListener, ActiveLayerChangeListener {
+public class RecentRelationsAction extends JosmAction implements ActionListener, CommandQueueListener {
 
     private final SideButton editButton;
     private final BasicArrowButton arrow;
     private final Shortcut shortcut;
+    private final LaunchEditorAction launchAction;
 
     /**
@@ -48,10 +45,9 @@
      */
     public RecentRelationsAction(SideButton editButton) {
+        super(RecentRelationsAction.class.getName(), null, null, null, false, true);
         this.editButton = editButton;
         arrow = editButton.createArrow(this);
         arrow.setToolTipText(tr("List of recent relations"));
         Main.main.undoRedo.addCommandQueueListener(this);
-        Main.getLayerManager().addLayerChangeListener(this);
-        Main.getLayerManager().addActiveLayerChangeListener(this);
         enableArrow();
         shortcut = Shortcut.registerShortcut(
@@ -61,5 +57,6 @@
             Shortcut.SHIFT
         );
-        Main.registerActionShortcut(new LaunchEditorAction(), shortcut);
+        launchAction = new LaunchEditorAction();
+        Main.registerActionShortcut(launchAction, shortcut);
     }
 
@@ -68,5 +65,7 @@
      */
     public void enableArrow() {
-        arrow.setVisible(getLastRelation() != null);
+        if (arrow != null) {
+            arrow.setVisible(getLastRelation() != null);
+        }
     }
 
@@ -109,21 +108,12 @@
 
     @Override
-    public void layerAdded(LayerAddEvent e) {
+    protected void updateEnabledState() {
         enableArrow();
     }
 
     @Override
-    public void layerRemoving(LayerRemoveEvent e) {
-        enableArrow();
-    }
-
-    @Override
-    public void layerOrderChanged(LayerOrderChangeEvent e) {
-        enableArrow();
-    }
-
-    @Override
-    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
-        enableArrow();
+    public void destroy() {
+        Main.unregisterActionShortcut(launchAction, shortcut);
+        super.destroy();
     }
 
@@ -143,5 +133,5 @@
     }
 
-    protected static class LaunchEditorAction extends AbstractAction {
+    static class LaunchEditorAction extends AbstractAction {
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -150,5 +140,5 @@
     }
 
-    protected static class RecentRelationsPopupMenu extends JPopupMenu {
+    static class RecentRelationsPopupMenu extends JPopupMenu {
         /**
          * Constructs a new {@code RecentRelationsPopupMenu}.
@@ -156,5 +146,5 @@
          * @param keystroke key stroke for the first menu item
          */
-        public RecentRelationsPopupMenu(List<Relation> recentRelations, KeyStroke keystroke) {
+        RecentRelationsPopupMenu(List<Relation> recentRelations, KeyStroke keystroke) {
             boolean first = true;
             for (Relation relation: recentRelations) {
@@ -171,5 +161,5 @@
         }
 
-        protected static void launch(Component parent, KeyStroke keystroke) {
+        static void launch(Component parent, KeyStroke keystroke) {
             Rectangle r = parent.getBounds();
             new RecentRelationsPopupMenu(getRecentRelationsOnActiveLayer(), keystroke).show(parent, r.x, r.y + r.height);
@@ -180,8 +170,8 @@
      * A specialized {@link JMenuItem} for presenting one entry of the relation history
      */
-    protected static class RecentRelationsMenuItem extends JMenuItem implements ActionListener {
-        protected final transient Relation relation;
+    static class RecentRelationsMenuItem extends JMenuItem implements ActionListener {
+        private final transient Relation relation;
 
-        public RecentRelationsMenuItem(Relation relation) {
+        RecentRelationsMenuItem(Relation relation) {
             super(relation.getDisplayName(DefaultNameFormatter.getInstance()));
             this.relation = relation;
@@ -194,4 +184,3 @@
         }
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 11609)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 11610)
@@ -189,8 +189,12 @@
     @Override
     public void destroy() {
+        recentRelationsAction.destroy();
         model.clear();
         super.destroy();
     }
 
+    /**
+     * Enable the "recent relations" dropdown menu next to edit button.
+     */
     public void enableRecentRelations() {
         recentRelationsAction.enableArrow();
