From e670acbb0d047dbf7519c174adc30f0405d64a8d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 3 Oct 2021 16:46:25 -0600 Subject: [PATCH] canvastable: fix logic error in ::compute_bounding_box() Since the bbox is determined by ::compute(), do not unconditionally clear it here --- libs/canvas/table.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/canvas/table.cc b/libs/canvas/table.cc index b90af1c6f1..4aeac549e9 100644 --- a/libs/canvas/table.cc +++ b/libs/canvas/table.cc @@ -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);