From 7dd54b5789aae821c3af5b5eb9536503832d9e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 15 Jan 2019 16:26:13 +0100 Subject: [PATCH] treeview: Don't get separator_height more than once Closes !209 --- gtk/gtktreeview.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index dc31077220..01f30f5450 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -5545,6 +5545,7 @@ validate_row (GtkTreeView *tree_view, gboolean is_separator = FALSE; gboolean draw_vgrid_lines, draw_hgrid_lines; gint expander_size; + int separator_height; /* double check the row needs validating */ if (! GTK_TREE_RBNODE_FLAG_SET (node, GTK_TREE_RBNODE_INVALID) && @@ -5573,6 +5574,8 @@ validate_row (GtkTreeView *tree_view, first_column = first_column->next) ; + separator_height = get_separator_height (tree_view); + context = gtk_widget_get_style_context (GTK_WIDGET (tree_view)); gtk_style_context_save (context); gtk_style_context_add_class (context, GTK_STYLE_CLASS_CELL); @@ -5604,7 +5607,7 @@ validate_row (GtkTreeView *tree_view, if (is_separator) { - height = get_separator_height (tree_view); + height = separator_height; } else {