Fix empty tree rendering.

svn path=/trunk/netsurf/; revision=11135
This commit is contained in:
Michael Drake 2010-12-29 16:39:23 +00:00
parent 0d04658544
commit c154e7242d

View File

@ -1854,20 +1854,21 @@ void tree_draw(struct tree *tree, int x, int y,
&plot_style_fill_tree_background); &plot_style_fill_tree_background);
/* don't draw empty trees or trees with redraw flag set to false */ /* don't draw empty trees or trees with redraw flag set to false */
if (tree->root->child == NULL || !tree->redraw) if (tree->root->child != NULL && tree->redraw) {
return;
/* Draw the tree */ /* Draw the tree */
tree_draw_tree(tree, tree->root, x, y, clip); tree_draw_tree(tree, tree->root, x, y, clip);
if (tree->editing != NULL) { /* Draw textarea, if present */
x = x + tree->editing->box.x; if (tree->editing != NULL) {
y = y + tree->editing->box.y; x = x + tree->editing->box.x;
if (tree->editing->type == NODE_ELEMENT_TEXT_PLUS_ICON) y = y + tree->editing->box.y;
x += NODE_INSTEP; if (tree->editing->type == NODE_ELEMENT_TEXT_PLUS_ICON)
textarea_redraw(tree->textarea, x, y, x += NODE_INSTEP;
clip.x0, clip.y0, clip.x1, clip.y1); textarea_redraw(tree->textarea, x, y,
} clip.x0, clip.y0, clip.x1, clip.y1);
}
}
/* Rendering complete */ /* Rendering complete */
if (plot.option_knockout) if (plot.option_knockout)