mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
GAbstractView: Add on_selection callback.
This callback is fired whenever the model's selection is updated. Note that it only fires when there is a model, and when the index is valid.
This commit is contained in:
@@ -44,6 +44,8 @@ void GAbstractView::did_update_selection()
|
||||
{
|
||||
if (!model() || model()->selected_index() != m_edit_index)
|
||||
stop_editing();
|
||||
if (model() && on_selection && model()->selected_index().is_valid())
|
||||
on_selection(model()->selected_index());
|
||||
}
|
||||
|
||||
void GAbstractView::did_scroll()
|
||||
|
||||
Reference in New Issue
Block a user