[gtk+] treeview: Don't try to optimize away selection_changed signal
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Don't try to optimize away selection_changed signal
- Date: Sat, 10 Dec 2011 07:01:46 +0000 (UTC)
commit d4d2cc14d2c9d504a44f681828c38f2faa846970
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 10 06:49:29 2011 +0100
treeview: Don't try to optimize away selection_changed signal
We get certain cases, in particular with SELECTION_MULTIPLE, where we
cannot figure out in advance of real_set_cursor() if the selection will
actually change.
gtk/gtktreeview.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index c8a1438..2c3b00a 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -9105,7 +9105,7 @@ gtk_tree_view_row_deleted (GtkTreeModel *model,
else
gtk_tree_view_real_set_cursor (tree_view, NULL, CLEAR_AND_SELECT | CURSOR_INVALID);
}
- else if (selection_changed)
+ if (selection_changed)
g_signal_emit_by_name (tree_view->priv->selection, "changed");
}
@@ -12908,11 +12908,9 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
_gtk_rbtree_remove (node->children);
- /* if we change the cursor, we also change the selection,
- * so no need to emit selection-changed. */
if (cursor_changed)
gtk_tree_view_real_set_cursor (tree_view, path, CLEAR_AND_SELECT | CURSOR_INVALID);
- else if (selection_changed)
+ if (selection_changed)
g_signal_emit_by_name (tree_view->priv->selection, "changed");
if (animate)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]