Code

fix 252547: skip explicitly hidden objects when calculating bbox of group
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 5 Aug 2008 18:40:15 +0000 (18:40 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 5 Aug 2008 18:40:15 +0000 (18:40 +0000)
src/display/nr-arena-group.cpp
src/sp-item-group.cpp

index 51f1c6b2f1821179135d9734003614b94fcdbb69..716a9f9fd3dd254cda0a77fa7ad4b71c10831b47 100644 (file)
@@ -181,7 +181,8 @@ nr_arena_group_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int
     if (beststate & NR_ARENA_ITEM_STATE_BBOX) {
         nr_rect_l_set_empty (&item->bbox);
         for (NRArenaItem *child = group->children; child != NULL; child = child->next) {
-            nr_rect_l_union (&item->bbox, &item->bbox, &child->bbox);
+            if (child->visible)
+                nr_rect_l_union (&item->bbox, &item->bbox, &child->bbox);
         }
     }
 
index 9e6333f97dcc14c42bbd9e6caa845c75341008b4..80089df35d3be643fdb5b8b4d80df64c9546ab36 100644 (file)
@@ -701,7 +701,7 @@ void CGroup::calculateBBox(NRRect *bbox, NR::Matrix const &transform, unsigned c
     GSList *l = _group->childList(false, SPObject::ActionBBox);
     while (l) {
         SPObject *o = SP_OBJECT (l->data);
-        if (SP_IS_ITEM(o)) {
+        if (SP_IS_ITEM(o) && !SP_ITEM(o)->isHidden()) {
             SPItem *child = SP_ITEM(o);
             NR::Matrix const ct(child->transform * transform);
             sp_item_invoke_bbox_full(child, &dummy_bbox, ct, flags, FALSE);