mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibGUI: Don't show non-visible actions in CommandPalette
This commit is contained in:
parent
5d5f9f52a0
commit
cc4184cb47
1 changed files with 2 additions and 2 deletions
|
@ -232,14 +232,14 @@ void CommandPalette::collect_actions(GUI::Window& parent_window)
|
|||
|
||||
auto collect_action_children = [&](Core::Object& action_parent) {
|
||||
action_parent.for_each_child_of_type<GUI::Action>([&](GUI::Action& action) {
|
||||
if (action.is_enabled())
|
||||
if (action.is_enabled() && action.is_visible())
|
||||
actions.set(action);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
};
|
||||
|
||||
Function<bool(GUI::Action*)> should_show_action = [&](GUI::Action* action) {
|
||||
return action && action->is_enabled() && action->shortcut() != Shortcut(Mod_Ctrl | Mod_Shift, Key_A);
|
||||
return action && action->is_enabled() && action->is_visible() && action->shortcut() != Shortcut(Mod_Ctrl | Mod_Shift, Key_A);
|
||||
};
|
||||
|
||||
Function<void(Menu&)> collect_actions_from_menu = [&](Menu& menu) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue