Merge pull request #8322 from romanalexander/pulls/fix-panel-layout
Fix plugin list layout when a plugin dynamically adds / removes buttons.
This commit is contained in:
@@ -224,10 +224,12 @@ public class ClientUI
|
||||
if (inTitle)
|
||||
{
|
||||
titleToolbar.addComponent(event.getButton(), button);
|
||||
titleToolbar.revalidate();
|
||||
}
|
||||
else
|
||||
{
|
||||
pluginToolbar.addComponent(event.getButton(), button);
|
||||
pluginToolbar.revalidate();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -238,7 +240,9 @@ public class ClientUI
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
pluginToolbar.removeComponent(event.getButton());
|
||||
pluginToolbar.revalidate();
|
||||
titleToolbar.removeComponent(event.getButton());
|
||||
titleToolbar.revalidate();
|
||||
final PluginPanel pluginPanel = event.getButton().getPanel();
|
||||
|
||||
if (pluginPanel != null)
|
||||
|
||||
Reference in New Issue
Block a user