From db2a1d3620ada227cdf92a0810b5ab1651ce82fb Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Thu, 22 Sep 2022 06:51:05 -0400 Subject: [PATCH] LibGUI: Always activate ComboBox ListView selections on MouseUp Fixes having to doubleclick selected items to activate them if the selection index hasn't changed since last activation. --- Userland/Libraries/LibGUI/ComboBox.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp index 281ed7d676..3ce822676b 100644 --- a/Userland/Libraries/LibGUI/ComboBox.cpp +++ b/Userland/Libraries/LibGUI/ComboBox.cpp @@ -126,10 +126,10 @@ ComboBox::ComboBox() m_list_view->set_hover_highlighting(true); m_list_view->set_frame_thickness(1); m_list_view->set_frame_shadow(Gfx::FrameShadow::Plain); + m_list_view->set_activates_on_selection(true); m_list_view->on_selection_change = [this] { VERIFY(model()); const auto& index = m_list_view->selection().first(); - m_list_view->set_activates_on_selection(true); if (m_updating_model) selection_updated(index); }; @@ -140,7 +140,6 @@ ComboBox::ComboBox() if (on_change) on_change(m_editor->text(), index); }); - m_list_view->set_activates_on_selection(false); close(); };