From 92929b968bd479e237b8f6dc1686ca953f4d8c5d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 10 Dec 2011 07:54:34 +0100 Subject: [PATCH] treeview: Ensure selection's changed signal There was a corner case where the changed signal was not emitted. If rows were built like this: 1 (not selected) + 2 (selected) + 3 (not selected) And row 1 was removed, no signal would be emitted. I like it when writing tests actually finds bugs that have been around since 2003 - introduced by 4a03ea2334bde7d2e15d0933c5a78f5a2338a854 actually. :) --- gtk/gtktreeview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 2c3b00a768..d0baa4576b 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -8967,7 +8967,7 @@ check_selection_helper (GtkRBTree *tree, { gint *value = (gint *)data; - *value = GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED); + *value |= GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED); if (node->children && !*value) _gtk_rbtree_traverse (node->children, node->children->root, G_POST_ORDER, check_selection_helper, data);