canvastable: fix logic error in ::compute_bounding_box()

Since the bbox is determined by ::compute(), do not unconditionally clear it here
This commit is contained in:
Paul Davis 2021-10-03 16:46:25 -06:00
parent bfc3c51052
commit e670acbb0d
1 changed files with 3 additions and 1 deletions

View File

@ -108,8 +108,8 @@ Table::child_changed (bool bbox_changed)
void
Table::compute_bounding_box() const
{
_bounding_box = Rect();
if (cells.empty()) {
_bounding_box = Rect();
bb_clean ();
return;
}
@ -630,6 +630,8 @@ Table::compute (Rect const & within)
_bounding_box = Rect (0, 0, hpos, vpos);
DEBUG_TRACE (DEBUG::CanvasTable, string_compose ("table bbox in compute() %1\n", _bounding_box));
/* return our size */
return Duple (hpos, vpos);