mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Canvas: propagate ::size_allocate() down the item tree
This previously wasn't done because of fear that it would affect the traditional fixed-sized canvas, but only items that _layout_sensitive (i.e. are packed into a constraint packer directly) will actually do anything in ::size_allocate(). Possibly might want to relax this to cover items that have a constraint packer between them and a root group.
This commit is contained in:
parent
d51893dec6
commit
860d43697c
6 changed files with 27 additions and 24 deletions
|
|
@ -288,13 +288,13 @@ Rectangle::vertical_fraction (double y) const
|
|||
void
|
||||
Rectangle::size_allocate (Rect const & r)
|
||||
{
|
||||
_allocation = r;
|
||||
Item::size_allocate (r);
|
||||
|
||||
if (_layout_sensitive) {
|
||||
/* set position, and then set the _rect member with values that
|
||||
use _position as the origin.
|
||||
/* Item::size_allocate() will have 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue