From 0fc1925cd718083665ecb478e827004136c22800 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Sun, 4 Sep 2022 10:18:19 -0400 Subject: [PATCH] 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. --- Userland/Libraries/LibGUI/AbstractButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGUI/AbstractButton.cpp b/Userland/Libraries/LibGUI/AbstractButton.cpp index 52a36442e0..72fb75010d 100644 --- a/Userland/Libraries/LibGUI/AbstractButton.cpp +++ b/Userland/Libraries/LibGUI/AbstractButton.cpp @@ -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);