From 75c82c33e6f5c2cdf8f13d213bcd96223a0839af Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 18 Dec 2010 16:35:52 +0000 Subject: Draw tree background when there are no nodes. svn path=/trunk/netsurf/; revision=11092 --- desktop/tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'desktop') diff --git a/desktop/tree.c b/desktop/tree.c index b0fe2c6e3..748e7b952 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -1802,10 +1802,6 @@ void tree_draw(struct tree *tree, int x, int y, assert(tree != NULL); assert(tree->root != NULL); - /* don't draw empty trees or trees with redraw flag set to false */ - if (tree->root->child == NULL || !tree->redraw) - return; - /* Set up clip rectangle */ clip.x0 = x + clip_x; clip.y0 = y + clip_y; @@ -1817,6 +1813,10 @@ void tree_draw(struct tree *tree, int x, int y, plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1, &plot_style_fill_tree_background); + /* don't draw empty trees or trees with redraw flag set to false */ + if (tree->root->child == NULL || !tree->redraw) + return; + /* Draw the tree */ tree_draw_tree(tree, tree->root, x, y, clip); -- cgit v1.2.3