13
0

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

This commit is contained in:
Paul Davis 2014-06-18 21:02:30 -04:00
parent 6b2c581c22
commit c1045881dd

View File

@ -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 ();
}