mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI: Convert various little things to GModelSelection
All the little things that were using the per-model seletion are now moving over to GModelSelection.
This commit is contained in:
@@ -31,16 +31,16 @@ void GAbstractView::set_model(RefPtr<GModel>&& model)
|
||||
|
||||
void GAbstractView::did_update_model()
|
||||
{
|
||||
if (!model() || model()->selected_index() != m_edit_index)
|
||||
if (!model() || selection().first() != m_edit_index)
|
||||
stop_editing();
|
||||
}
|
||||
|
||||
void GAbstractView::did_update_selection()
|
||||
{
|
||||
if (!model() || model()->selected_index() != m_edit_index)
|
||||
if (!model() || selection().first() != m_edit_index)
|
||||
stop_editing();
|
||||
if (model() && on_selection && model()->selected_index().is_valid())
|
||||
on_selection(model()->selected_index());
|
||||
if (model() && on_selection && selection().first().is_valid())
|
||||
on_selection(selection().first());
|
||||
}
|
||||
|
||||
void GAbstractView::did_scroll()
|
||||
|
||||
Reference in New Issue
Block a user