mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 21:55:43 +01:00
add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed)
This commit is contained in:
parent
fee8de9787
commit
fca81c9a6a
5 changed files with 67 additions and 171 deletions
|
|
@ -236,13 +236,14 @@ Item::parent_to_item (ArdourCanvas::Rect const & d) const
|
|||
void
|
||||
Item::unparent ()
|
||||
{
|
||||
_canvas = 0;
|
||||
_parent = 0;
|
||||
}
|
||||
|
||||
void
|
||||
Item::reparent (Group* new_parent)
|
||||
{
|
||||
assert (_canvas == _parent->canvas ());
|
||||
|
||||
if (_parent) {
|
||||
_parent->remove (this);
|
||||
}
|
||||
|
|
@ -250,7 +251,6 @@ Item::reparent (Group* new_parent)
|
|||
assert (new_parent);
|
||||
|
||||
_parent = new_parent;
|
||||
_canvas = _parent->canvas ();
|
||||
_parent->add (this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue