Browse Source

Don't modify the layout of a container whilst its visible.

Fixes issue 4083

Change-Id: I6b939c7516b481366d0933f6b572d76616e89864
Reviewed-on: http://gerrit.dmdirc.com/1192
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4
Greboid 14 years ago
parent
commit
a9bb982de5

+ 4
- 3
src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/ButtonBar.java View File

@@ -217,9 +217,10 @@ public final class ButtonBar implements FrameManager, ActionListener,
217 217
      * Removes all buttons from the bar and readds them.
218 218
      */
219 219
     private void relayout() {
220
-       buttonPanel.removeAll();
221
-       insertButtons(WindowManager.getRootWindows());
222
-       buttonPanel.repaint();
220
+        buttonPanel.setVisible(false);
221
+        buttonPanel.removeAll();
222
+        insertButtons(WindowManager.getRootWindows());
223
+        buttonPanel.setVisible(true);
223 224
     }
224 225
 
225 226
     /**

Loading…
Cancel
Save