[gtk+] Do not emit has-child-toggled when a root level node is removed



commit 532eccabde13286de3bc33c558b7a09a80e4489b
Author: Kristian Rietveld <kris gtk org>
Date:   Tue Sep 1 17:49:02 2009 +0200

    Do not emit has-child-toggled when a root level node is removed

 gtk/gtktreemodelfilter.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index 5c6a648..0d982b2 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -997,7 +997,10 @@ gtk_tree_model_filter_remove_node (GtkTreeModelFilter *filter,
    *  if level != root level and visible nodes == 0, emit row-has-child-toggled.
    */
 
-  if (level != filter->priv->root && level->visible_nodes == 0)
+  if (level != filter->priv->root
+      && level->visible_nodes == 0
+      && level->parent_elt
+      && level->parent_elt->visible)
     emit_child_toggled = TRUE;
 
   if (length > 1)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]