summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-10-01 13:25:44 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-10-01 13:25:44 +0000
commit87d93e27330577c2fd632dbaccbd3103884aa590 (patch)
tree2acaa8e8ab51a4dbaef40bd22bd780bdaceae0db /src/sp-item.cpp
parentFix possible bug in DrawingItem code (diff)
downloadinkscape-87d93e27330577c2fd632dbaccbd3103884aa590.tar.gz
inkscape-87d93e27330577c2fd632dbaccbd3103884aa590.zip
Comprehensive fix for the issues with disappearing filtered objects.
Fixes #304407 and possibly a few other bugs. Revert incorrect _item_bbox changes from r12528. Fixed bugs: - https://launchpad.net/bugs/304407 (bzr r12648)
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index c342bfd9b..5bf0afdeb 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -603,13 +603,13 @@ void SPItem::update(SPCtx *ctx, guint flags) {
}
}
}
- /* Update bounding box data used by filters */
+ /* Update bounding box in user space, used for filter and objectBoundingBox units */
if (item->style->filter.set && item->display) {
- Geom::OptRect item_bbox = item->visualBounds();
+ Geom::OptRect item_bbox = item->geometricBounds();
SPItemView *itemview = item->display;
do {
- if (itemview->arenaitem) // Already enlarged by visualBounds
- itemview->arenaitem->setFilterBounds(item_bbox);
+ if (itemview->arenaitem)
+ itemview->arenaitem->setItemBounds(item_bbox);
} while ( (itemview = itemview->next) );
}
@@ -1065,12 +1065,8 @@ Inkscape::DrawingItem *SPItem::invoke_show(Inkscape::Drawing &drawing, unsigned
SP_MASK(mask)->sp_mask_set_bbox(mask_key, item_bbox);
mask->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
- if (style->filter.set && display) {
- item_bbox = visualBounds();
- }
ai->setData(this);
- // Already enlarged by visualBounds for filters
- ai->setFilterBounds(item_bbox);
+ ai->setItemBounds(geometricBounds());
}
return ai;