mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
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:
parent
d4d2cc14d2
commit
92929b968b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user