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 4a03ea2334
actually. :)
This commit is contained in:
Benjamin Otte 2011-12-10 07:54:34 +01:00
parent d4d2cc14d2
commit 92929b968b

View File

@ -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);