- if (xr->cairo)
- xr_draw_title (xr, table_item_get_caption (ts->table_item),
- xr->width, ts->caption_height);
-
- xr->y += ts->caption_height;
- ts->caption_height = 0;
+ if (ts->caption_height)
+ {
+ if (xr->cairo)
+ xr_draw_title (xr, table_item_get_caption (ts->table_item),
+ xr->width, ts->caption_height);
+ ts->caption_height = 0;
+ }
+ xr->y += caption_height + used;