From 8d1cf4a8eb643aa1ef3f0b91e457f3318cf71bd3 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Sat, 28 Dec 2024 08:04:03 -0500 Subject: [PATCH] Fix table cell backgrounds not being completely filled sometimes Needed to cache and reapply bounding boxes to cells after adjusting their scalings. --- src/graphs/table.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphs/table.cpp b/src/graphs/table.cpp index f58cffd8..87dbc0dc 100644 --- a/src/graphs/table.cpp +++ b/src/graphs/table.cpp @@ -1513,7 +1513,9 @@ namespace Wisteria::Graphs // homogenize cells' text scaling to the smallest size and add them for (auto& cellLabel : cellLabels) { + const wxRect bBox = cellLabel->GetBoundingBox(dc); cellLabel->SetScaling(smallestTextScaling); + cellLabel->SetBoundingBox(bBox, dc, GetScaling()); // if using page alignment other than left aligned, then adjust its position if (horizontalAlignmentOffset > 0 || verticalAlignmentOffset > 0) {