mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 23:17: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
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
DockingWindowManager.clearMouseOverHelp();
|
DockingWindowManager.clearMouseOverHelp();
|
||||||
ActionContext context = windowManager.getActionContext(toolBarAction);
|
ActionContext context = getActionContext();
|
||||||
|
|
||||||
context.setSourceObject(event.getSource());
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return toolBarAction.getName();
|
return toolBarAction.getName();
|
||||||
|
|||||||
Reference in New Issue
Block a user