mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
sortlistmodel: Fix handling of section sort keys
When the section sorter changes, we need to update the keys, otherwise the sorter will continue to report the old sections. This code is currently a bit suboptimal, since the creation of sort keys and section sort keys are muddled together. Fixes: #5854
This commit is contained in:
parent
43417e9e55
commit
c3d3e2d47b
@ -912,6 +912,12 @@ gtk_sort_list_model_sorter_changed_cb (GtkSorter *sorter,
|
||||
}
|
||||
}
|
||||
|
||||
if (self->section_sorter)
|
||||
{
|
||||
gtk_sort_keys_unref (self->section_sort_keys);
|
||||
self->section_sort_keys = gtk_sorter_get_keys (self->section_sorter);
|
||||
}
|
||||
|
||||
if (gtk_sort_list_model_start_sorting (self, NULL))
|
||||
pos = n_items = 0;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user