treelistmodel: Don't add items in reverse

This was broken since commit bf55685000
where we started to track items.

Fixes #5707
This commit is contained in:
Benjamin Otte
2023-03-29 02:56:47 +02:00
parent 506206e1bd
commit 1718db144e

View File

@@ -357,7 +357,7 @@ gtk_tree_list_model_items_changed_cb (GListModel *model,
}
tree_added = added;
for (i = 0; i < added; i++)
for (i = added; i-- > 0;)
{
child = gtk_rb_tree_insert_before (node->children, child);
child->parent = node;