aboutsummaryrefslogtreecommitdiff
path: root/generic/Item.c
diff options
context:
space:
mode:
authorlecoanet2007-09-07 14:02:46 +0000
committerlecoanet2007-09-07 14:02:46 +0000
commitfd62652445f30a6aab602ba1a6b5454b8ed6537b (patch)
tree24bc7bd95443fffbdea4ecf5492820d0fcbd4788 /generic/Item.c
parent69a9aaea31de13274865e28da091853994013bf9 (diff)
downloadtkzinc-fd62652445f30a6aab602ba1a6b5454b8ed6537b.zip
tkzinc-fd62652445f30a6aab602ba1a6b5454b8ed6537b.tar.gz
tkzinc-fd62652445f30a6aab602ba1a6b5454b8ed6537b.tar.bz2
tkzinc-fd62652445f30a6aab602ba1a6b5454b8ed6537b.tar.xz
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.
Diffstat (limited to 'generic/Item.c')
-rw-r--r--generic/Item.c17
1 files changed, 11 insertions, 6 deletions
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);