From 9095057675a00116c562a45589e9ca96a143841a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 27 Jul 2021 13:17:48 -0600 Subject: [PATCH] canvas: call Item::bounding_box() to recompute bounding box when needed Since 74fe396cc5 compute_bounding_box() by itself does not do the entire computation, so we must call into Item::bounding_box() to get the result with children added also --- libs/canvas/box.cc | 2 +- libs/canvas/grid.cc | 2 +- libs/canvas/polygon.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/canvas/box.cc b/libs/canvas/box.cc index 6f3a3b2dc0..6e42ff094b 100644 --- a/libs/canvas/box.cc +++ b/libs/canvas/box.cc @@ -256,7 +256,7 @@ Box::layout () if (yes_do_it) { reposition_children (); - compute_bounding_box (); + (void) bounding_box (); const double w = std::max (requested_width, _bounding_box.width()); const double h = std::max (requested_height, _bounding_box.height()); diff --git a/libs/canvas/grid.cc b/libs/canvas/grid.cc index b5b2b5bf08..5b76894945 100644 --- a/libs/canvas/grid.cc +++ b/libs/canvas/grid.cc @@ -162,7 +162,7 @@ void Grid::reset_bg () { if (_bounding_box_dirty) { - compute_bounding_box (); + (void) bounding_box (); } if (!_bounding_box) { diff --git a/libs/canvas/polygon.cc b/libs/canvas/polygon.cc index 215d51ce6f..6751a1851f 100644 --- a/libs/canvas/polygon.cc +++ b/libs/canvas/polygon.cc @@ -129,7 +129,7 @@ Polygon::covers (Duple const & point) const bool oddNodes = false; if (_bounding_box_dirty) { - compute_bounding_box (); + (void) bounding_box (); } for (i = 0; i < npoints; i++) {