mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibGUI: Simulate a click on arrow key events for AbstractButtons
in exclusive, checkable groups. Instead of merely setting the button checked, call click() so buttons with registered actions can activate. Fixes ActionGroups like FileManager's view type checkables not activating when cycled with the keyboard.
This commit is contained in:
parent
ab29f8976d
commit
0fc1925cd7
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ void AbstractButton::keydown_event(KeyEvent& event)
|
|||
new_checked_index = this_index == 0 ? exclusive_siblings.size() - 1 : this_index - 1;
|
||||
else
|
||||
new_checked_index = this_index == exclusive_siblings.size() - 1 ? 0 : this_index + 1;
|
||||
exclusive_siblings[new_checked_index].set_checked(true);
|
||||
exclusive_siblings[new_checked_index].click();
|
||||
return;
|
||||
}
|
||||
Widget::keydown_event(event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue