mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-24 03:09:36 +08:00
fixes #1810 broken toolbar actions on nodes in the function graph
This commit is contained in:
@@ -113,7 +113,7 @@ public class ToolBarItemManager implements PropertyChangeListener, ActionListene
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
DockingWindowManager.clearMouseOverHelp();
|
||||
ActionContext context = windowManager.getActionContext(toolBarAction);
|
||||
ActionContext context = getActionContext();
|
||||
|
||||
context.setSourceObject(event.getSource());
|
||||
|
||||
@@ -130,6 +130,18 @@ public class ToolBarItemManager implements PropertyChangeListener, ActionListene
|
||||
});
|
||||
}
|
||||
|
||||
private ActionContext getActionContext() {
|
||||
if (windowManager != null) {
|
||||
return windowManager.getActionContext(toolBarAction);
|
||||
}
|
||||
|
||||
ComponentProvider provider = getComponentProvider();
|
||||
ActionContext context = provider == null ? null : provider.getActionContext(null);
|
||||
final ActionContext actionContext =
|
||||
context == null ? new ActionContext(provider, null) : context;
|
||||
return actionContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return toolBarAction.getName();
|
||||
|
||||
Reference in New Issue
Block a user