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)
|
if (inTitle)
|
||||||
{
|
{
|
||||||
titleToolbar.addComponent(event.getButton(), button);
|
titleToolbar.addComponent(event.getButton(), button);
|
||||||
|
titleToolbar.revalidate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pluginToolbar.addComponent(event.getButton(), button);
|
pluginToolbar.addComponent(event.getButton(), button);
|
||||||
|
pluginToolbar.revalidate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -238,7 +240,9 @@ public class ClientUI
|
|||||||
SwingUtilities.invokeLater(() ->
|
SwingUtilities.invokeLater(() ->
|
||||||
{
|
{
|
||||||
pluginToolbar.removeComponent(event.getButton());
|
pluginToolbar.removeComponent(event.getButton());
|
||||||
|
pluginToolbar.revalidate();
|
||||||
titleToolbar.removeComponent(event.getButton());
|
titleToolbar.removeComponent(event.getButton());
|
||||||
|
titleToolbar.revalidate();
|
||||||
final PluginPanel pluginPanel = event.getButton().getPanel();
|
final PluginPanel pluginPanel = event.getButton().getPanel();
|
||||||
|
|
||||||
if (pluginPanel != null)
|
if (pluginPanel != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user