treeview: Don't get separator_height more than once

Closes !209
This commit is contained in:
Timm Bäder 2019-01-15 16:26:13 +01:00
parent 697aa95c7e
commit 7dd54b5789

View File

@ -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
{