[gtk+/gtk-3-6] treeview: Delay computing fixed height



commit 335ede0f83b7c4686c6414674ac8f335dee078bf
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 6363437..b1528da 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -8133,9 +8133,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 
     {
@@ -8154,11 +8151,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]