[gtk+] treeview: Ensure selection's changed signal
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Ensure selection's changed signal
- Date: Sat, 10 Dec 2011 07:01:51 +0000 (UTC)
commit 92929b968bd479e237b8f6dc1686ca953f4d8c5d
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 10 07:54:34 2011 +0100
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 2c3b00a..d0baa45 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]