mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI: Make model sorting imperative and move order to AbstractView
Instead of SortingProxyModel having a column+order, we move that state to AbstractView. When you click on a column header, the view tells the model to resort the relevant column with the new order. This is implemented in SortingProxyModel by simply walking all the reified source/proxy mappings and resorting their row indexes.
This commit is contained in:
@@ -212,4 +212,11 @@ void MultiView::set_multi_select(bool multi_select)
|
||||
apply_multi_select();
|
||||
}
|
||||
|
||||
void MultiView::set_key_column_and_sort_order(int column, SortOrder sort_order)
|
||||
{
|
||||
for_each_view_implementation([&](auto& view) {
|
||||
view.set_key_column_and_sort_order(column, sort_order);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user