[gtk+] gtktreemodelfilter: only maintain cache at 1 level depth instead of 2



commit 6cd134d39e11e274a693e36f0c172c11bec0a50c
Author: Kristian Rietveld <kris gtk org>
Date:   Sat Aug 20 10:54:00 2011 +0200

    gtktreemodelfilter: only maintain cache at 1 level depth instead of 2

 gtk/gtktreemodelfilter.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index 36d2ef7..5448385 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -881,8 +881,7 @@ gtk_tree_model_filter_build_level (GtkTreeModelFilter *filter,
    * possible changes in state of the parent are not requested.
    */
   if (empty &&
-       (parent_level && parent_level->parent_level &&
-        parent_level->parent_elt->ext_ref_count == 0))
+       (parent_level && parent_elt->ext_ref_count == 0))
     {
       gtk_tree_model_filter_free_level (filter, new_level, FALSE);
       return;
@@ -1190,8 +1189,7 @@ gtk_tree_model_filter_clear_cache_helper (GtkTreeModelFilter *filter,
    */
   if (level->ext_ref_count == 0 && level != filter->priv->root &&
       level->parent_level && level->parent_elt &&
-      level->parent_level->parent_level &&
-      level->parent_level->parent_elt->ext_ref_count == 0)
+      level->parent_elt->ext_ref_count == 0)
     {
       gtk_tree_model_filter_free_level (filter, level, TRUE);
       return;



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