From c1045881dd1dc0647102f3329a2ada12111795a8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 18 Jun 2014 21:02:30 -0400 Subject: 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 --- libs/canvas/item.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libs/canvas/item.cc') 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 (); } -- cgit v1.2.3