mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-29 15:41:45 +00:00
Fixed 'Open Program' action enablement when no programs are open
This commit is contained in:
parent
4be9db7356
commit
cbc32d4174
@ -526,11 +526,15 @@ public class ProgramManagerPlugin extends Plugin implements ProgramManager {
|
||||
.menuPath(ToolConstants.MENU_FILE, "&Open...")
|
||||
.menuGroup(OPEN_GROUP, Integer.toString(subMenuGroupOrder++))
|
||||
.keyBinding("ctrl O")
|
||||
.withContext(ProgramActionContext.class)
|
||||
.inWindow(ActionBuilder.When.CONTEXT_MATCHES)
|
||||
.onAction(c -> open())
|
||||
.buildAndInstall(tool);
|
||||
|
||||
// .withContext(ProgramActionContext.class)
|
||||
// .inWindow(ActionBuilder.When.CONTEXT_MATCHES)
|
||||
// openAction doesn't really use a context, but we want it to be in windows that
|
||||
// have providers that use programs.
|
||||
openAction.addToWindowWhen(ProgramActionContext.class);
|
||||
|
||||
closeAction = new ActionBuilder("Close File", getName())
|
||||
.menuPath(ToolConstants.MENU_FILE, "&Close")
|
||||
.menuGroup(OPEN_GROUP, Integer.toString(subMenuGroupOrder++))
|
||||
|
Loading…
Reference in New Issue
Block a user