mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Fixed the Close action to not close the Front End provider
This commit is contained in:
parent
93c19e3cc6
commit
e767916357
2 changed files with 13 additions and 4 deletions
|
@ -206,13 +206,19 @@ class DockableToolBarManager {
|
|||
|
||||
@Override
|
||||
public boolean isEnabledForContext(ActionContext context) {
|
||||
DockingWindowManager dwm = DockingWindowManager.getActiveInstance();
|
||||
ComponentProvider provider = context.getComponentProvider();
|
||||
if (provider == null) {
|
||||
// Some context providers do not specify the provider when creating a contexts
|
||||
DockingWindowManager dwm = DockingWindowManager.getActiveInstance();
|
||||
provider = dwm.getActiveComponentProvider();
|
||||
}
|
||||
return provider == dockableComponent.getComponentProvider();
|
||||
|
||||
if (provider != dockableComponent.getComponentProvider()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// don't allow the last component in a window to be closed to prevent an empty window
|
||||
return !dwm.isLastComponentInWindow(provider);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue