Index: src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 16111)
+++ src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(working copy)
@@ -975,6 +975,14 @@
         return data;
     }
 
+    /**
+     * Clear button actions. Should be used when recreating the layout with sidebuttons, and the previous sidebuttons are no longer desired.
+     * @since xxx
+     */
+    public void clearButtonActions() {
+        buttonActions.clear();
+    }
+
     @Override
     public void eventDispatched(AWTEvent event) {
         if (event instanceof MouseEvent && isShowing() && !isCollapsed && isDocked && buttonHiding == ButtonHidingType.DYNAMIC
