mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-2768, 2769 - Fixed duplicate drop-down menus; fixed stack trace when
no drop-down menu was visible
This commit is contained in:
parent
f12b6a52ad
commit
01ec7a3225
1 changed files with 10 additions and 0 deletions
|
@ -173,6 +173,7 @@ class DockableToolBarManager {
|
|||
Tool tool = dwm.getTool();
|
||||
ComponentProvider provider = dockableComponent.getComponentProvider();
|
||||
tool.removeLocalAction(provider, closeButtonManager.getAction());
|
||||
tool.removeLocalAction(provider, menuButtonManager.getAction());
|
||||
}
|
||||
|
||||
headerUpdater.dispose();
|
||||
|
@ -253,5 +254,14 @@ class DockableToolBarManager {
|
|||
popupMenu.addPopupMenuListener(menuManager.getMenuHandler());
|
||||
popupMenu.show(myButton, 0, d.height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabledForContext(ActionContext context) {
|
||||
if (myButton == null) {
|
||||
return false; // no menu items; no drop-down menu
|
||||
}
|
||||
ComponentProvider provider = context.getComponentProvider();
|
||||
return provider == dockableComponent.getComponentProvider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue