summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-03-29 02:23:46 +0000
committerMatthias Clasen <mclasen@redhat.com>2023-03-29 02:23:46 +0000
commitc5a53f235a2ed1b0acd0a8c29153e62377262d04 (patch)
tree2615f3f2c56fa8d7b20b5a825bbfce178fcb65c1 /gtk
parentea572227f02857447e85caeeebcfd1bfa0089fe2 (diff)
parentcd860beb3816c56b9d9570be1c4b1989ad0912bb (diff)
downloadgtk+-c5a53f235a2ed1b0acd0a8c29153e62377262d04.tar.gz
Merge branch 'wip/otte/trelistmodel-fixage' into 'main'
treelistmodel: Don't add items in reverse Closes #5707 See merge request GNOME/gtk!5744
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtktreelistmodel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
index dd3b3009cc..1e55323c0a 100644
--- a/gtk/gtktreelistmodel.c
+++ b/gtk/gtktreelistmodel.c
@@ -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;