From fd62652445f30a6aab602ba1a6b5454b8ed6537b Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 7 Sep 2007 14:02:46 +0000 Subject: The group bbox didn't take care of the items visibilty status resulting in wrong sized cumulative bboxes. The group has to be warned when an item visibility change. Both cases are handled by this patch. --- generic/Item.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'generic/Item.c') diff --git a/generic/Item.c b/generic/Item.c index 6739e0e..a9fec0b 100644 --- a/generic/Item.c +++ b/generic/Item.c @@ -1804,12 +1804,17 @@ ConfigureItem(ZnItem item, } } - if (previous_visible && ISCLEAR(item->flags, ZN_VISIBLE_BIT)) { - /* - * Special case when the item has its visibility - * just turned out. - */ - ZnDamage(wi, &item->item_bounding_box); + // + // If visibility changed. + if (previous_visible ^ ISSET(item->flags, ZN_VISIBLE_BIT)) { + // First must force an update of the parent geometry (bbox). + Invalidate(item, ZN_COORDS_FLAG); + // + // Special case when the item has its visibility + // just turned out. + if (ISCLEAR(item->flags, ZN_VISIBLE_BIT)) { + ZnDamage(wi, &item->item_bounding_box); + } } Invalidate(item, flags); -- cgit v1.1