Commit 022327c4 authored by Kristian Rietveld's avatar Kristian Rietveld

gtktreemodelfilter: child levels of the root level must remain cached

This is due to the special handling for filter functions that depend
on child level state.  If the parent level of a level is the root level,
the level cannot be removed from the cache.  Any change in this level
can cause its parent in the root level to become visible again.
parent ae2b2e7c
......@@ -1302,9 +1302,13 @@ gtk_tree_model_filter_clear_cache_helper (GtkTreeModelFilter *filter,
* free the level if the parent level also has an external ref
* count of zero. In that case, changes concerning our parent are
* not requested.
*
* The root level is always visible, so an exception holds for levels
* with the root level as parent level: these have to remain cached.
*/
if (level->ext_ref_count == 0 && level != filter->priv->root &&
level->parent_level && level->parent_level->ext_ref_count == 0)
level->parent_level && level->parent_level != filter->priv->root &&
level->parent_level->ext_ref_count == 0)
{
gtk_tree_model_filter_free_level (filter, level, TRUE, FALSE);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment