Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/GP-4558_ghidragon_action_chooser…
Browse files Browse the repository at this point in the history
…_dialog_bugs'
  • Loading branch information
ryanmkurtz committed Apr 25, 2024
2 parents caed8ef + 6dd517d commit f9ade82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void actionPerformed(ActionContext context) {
Tool tool = DockingWindowManager.getActiveInstance().getTool();

if (focusedWindow instanceof DockingDialog dialog) {
context = dialog.getDialogComponent().getActionContext(null);
showActionsDialog(tool, dialog, context);
}
else if (focusedWindow instanceof DockingFrame dockingFrame) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public ActionChooserDialog(ActionsModel model) {
"This dialog initialy shows only locally relevant actions. Repeat initial keybinding " +
"to show More. Use up down arrows to scroll through list of actions and press" +
" enter to invoke selected action. Type text to filter list.");
setOkEnabled(false);
}

@Override
Expand Down Expand Up @@ -308,7 +309,8 @@ private String getHtmlText(DockingActionIf action, String category, boolean isSe
Color fgName = getForeground(); // defaults to list foreground; handles selected state
Color fgKeyBinding = isSelected ? getForeground() : Messages.HINT;

if (!action.isEnabled()) {
ActionContext context = model.getContext();
if (!(action.isValidContext(context) && action.isEnabledForContext(context))) {
fgName = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
fgKeyBinding = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
disabledText = isSelected ? " <I>disabled</I>" : "";
Expand Down

0 comments on commit f9ade82

Please sign in to comment.