diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-18 21:02:30 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-18 21:02:30 -0400 |
commit | c1045881dd1dc0647102f3329a2ada12111795a8 (patch) | |
tree | c5384a551a11d4240a22151d7426376c82c2720d /libs/canvas/item.cc | |
parent | 6b2c581c225cce68e2dacb4e808af79640ce65c1 (diff) |
if we're not going to notify parents of bbox changes while an item is hidden, we need to remind it when the item is hidden or shown
Diffstat (limited to 'libs/canvas/item.cc')
-rw-r--r-- | libs/canvas/item.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc index 90bf0972f0..ea77008b5f 100644 --- a/libs/canvas/item.cc +++ b/libs/canvas/item.cc @@ -295,6 +295,15 @@ Item::hide () { if (_visible) { _visible = false; + + /* recompute parent bounding box, which may alter now that this + * child is hidden. + */ + + if (_parent) { + _parent->child_changed (); + } + _canvas->item_shown_or_hidden (this); } } @@ -304,6 +313,13 @@ Item::show () { if (!_visible) { _visible = true; + + /* bounding box may have changed while we were hidden */ + + if (_parent) { + _parent->child_changed (); + } + _canvas->item_shown_or_hidden (this); } } @@ -547,7 +563,7 @@ Item::end_change () { if (_visible) { _canvas->item_changed (this, _pre_change_bounding_box); - + if (_parent) { _parent->child_changed (); } |