mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
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.
This commit is contained in:
parent
7ac30f53a0
commit
db2a1d3620
1 changed files with 1 additions and 2 deletions
|
@ -126,10 +126,10 @@ ComboBox::ComboBox()
|
||||||
m_list_view->set_hover_highlighting(true);
|
m_list_view->set_hover_highlighting(true);
|
||||||
m_list_view->set_frame_thickness(1);
|
m_list_view->set_frame_thickness(1);
|
||||||
m_list_view->set_frame_shadow(Gfx::FrameShadow::Plain);
|
m_list_view->set_frame_shadow(Gfx::FrameShadow::Plain);
|
||||||
|
m_list_view->set_activates_on_selection(true);
|
||||||
m_list_view->on_selection_change = [this] {
|
m_list_view->on_selection_change = [this] {
|
||||||
VERIFY(model());
|
VERIFY(model());
|
||||||
const auto& index = m_list_view->selection().first();
|
const auto& index = m_list_view->selection().first();
|
||||||
m_list_view->set_activates_on_selection(true);
|
|
||||||
if (m_updating_model)
|
if (m_updating_model)
|
||||||
selection_updated(index);
|
selection_updated(index);
|
||||||
};
|
};
|
||||||
|
@ -140,7 +140,6 @@ ComboBox::ComboBox()
|
||||||
if (on_change)
|
if (on_change)
|
||||||
on_change(m_editor->text(), index);
|
on_change(m_editor->text(), index);
|
||||||
});
|
});
|
||||||
m_list_view->set_activates_on_selection(false);
|
|
||||||
close();
|
close();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue