diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-12-29 16:39:23 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-12-29 16:39:23 +0000 |
commit | c154e7242dd43b0516aad69ce88f9c87007fafcf (patch) | |
tree | fedb764e0e71273700230b6f3298c52a26c177af /desktop | |
parent | 0d0465854443639398333d40213cfc7583c3c991 (diff) | |
download | netsurf-c154e7242dd43b0516aad69ce88f9c87007fafcf.tar.gz netsurf-c154e7242dd43b0516aad69ce88f9c87007fafcf.tar.bz2 |
Fix empty tree rendering.
svn path=/trunk/netsurf/; revision=11135
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/tree.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/desktop/tree.c b/desktop/tree.c index bc033c4a9..1683c7a3f 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -1854,20 +1854,21 @@ void tree_draw(struct tree *tree, int x, int y, &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; + if (tree->root->child != NULL && tree->redraw) { - /* Draw the tree */ - tree_draw_tree(tree, tree->root, x, y, clip); + /* Draw the tree */ + tree_draw_tree(tree, tree->root, x, y, clip); - if (tree->editing != NULL) { - x = x + tree->editing->box.x; - y = y + tree->editing->box.y; - if (tree->editing->type == NODE_ELEMENT_TEXT_PLUS_ICON) - x += NODE_INSTEP; - textarea_redraw(tree->textarea, x, y, - clip.x0, clip.y0, clip.x1, clip.y1); - } + /* Draw textarea, if present */ + if (tree->editing != NULL) { + x = x + tree->editing->box.x; + y = y + tree->editing->box.y; + if (tree->editing->type == NODE_ELEMENT_TEXT_PLUS_ICON) + x += NODE_INSTEP; + textarea_redraw(tree->textarea, x, y, + clip.x0, clip.y0, clip.x1, clip.y1); + } + } /* Rendering complete */ if (plot.option_knockout) |