[gtk+] treeview: Delay computing fixed height



commit 239c631ad3ea0061bfe08522acad64882409cae3
Author: Benjamin Otte <otte redhat com>
Date:   Mon Nov 26 00:06:40 2012 +0100

    treeview: Delay computing fixed height
    
    In the setter, we only set fixed height mode and queue a revalidation of
    the row heights.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687816

 gtk/gtktreeview.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 1bba795..d651bd6 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -8138,9 +8138,6 @@ gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
     {
       tree_view->priv->fixed_height_mode = 0;
       tree_view->priv->fixed_height = -1;
-
-      /* force a revalidation */
-      install_presize_handler (tree_view);
     }
   else 
     {
@@ -8159,11 +8156,11 @@ gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
       
       tree_view->priv->fixed_height_mode = 1;
       tree_view->priv->fixed_height = -1;
-      
-      if (tree_view->priv->tree)
-	initialize_fixed_height_mode (tree_view);
     }
 
+  /* force a revalidation */
+  install_presize_handler (tree_view);
+
   g_object_notify (G_OBJECT (tree_view), "fixed-height-mode");
 }
 



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