diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc index 760ac6efb0..174a2d626a 100644 --- a/libs/canvas/rectangle.cc +++ b/libs/canvas/rectangle.cc @@ -288,12 +288,15 @@ Rectangle::vertical_fraction (double y) const void Rectangle::size_allocate (Rect const & r) { - /* leave position alone */ - _allocation = r; if (_layout_sensitive) { - set (r); + /* set position, and then set the _rect member with values that + use _position as the origin. + */ + _position = Duple (r.x0, r.y0); + Rect r2 (0, 0, r.x1 - r.x0, r.y1 - r.y0); + set (r2); } } @@ -306,3 +309,4 @@ Rectangle::set_corner_radius (double r) _corner_radius = r; end_change (); } +