summaryrefslogtreecommitdiffstats
path: root/src/sp-item-group.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-03-27 20:44:53 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-03-27 20:44:53 +0000
commitbb400a51918b21e0bf8d710a82995ab524c8073f (patch)
treec05f8e8d61f7d7dfd2b342a2a3ddb297be9a2261 /src/sp-item-group.cpp
parentpatch from bug 168024 (diff)
downloadinkscape-bb400a51918b21e0bf8d710a82995ab524c8073f.tar.gz
inkscape-bb400a51918b21e0bf8d710a82995ab524c8073f.zip
The deprecated version of sp_item_invoke_bbox_full (which still uses NRRects) returns empty rectangles when calculating geometric bboxes of vertical or horizontal lines. A group of those lines will therefore also have an empty geometric bbox, which is wrong. We must use the new version of sp_item_invoke_bbox_full, which uses NR::Maybe<NR::Rects> instead.
(bzr r5204)
Diffstat (limited to 'src/sp-item-group.cpp')
-rw-r--r--src/sp-item-group.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index 7969c1bc1..d0a1d9111 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -273,8 +273,6 @@ static gchar * sp_group_description (SPItem * item)
static NR::Matrix
sp_group_set_transform(SPItem *item, NR::Matrix const &xform)
{
- SPGroup *group = SP_GROUP(item);
-
Inkscape::Selection *selection = sp_desktop_selection(inkscape_active_desktop());
persp3d_split_perspectives_according_to_selection(selection);
@@ -684,16 +682,21 @@ void CGroup::onModified(guint flags) {
}
void CGroup::calculateBBox(NRRect *bbox, NR::Matrix const &transform, unsigned const flags) {
+
+ NR::Maybe<NR::Rect> dummy_bbox = NR::Nothing();
+
GSList *l = _group->childList(false, SPObject::ActionBBox);
while (l) {
SPObject *o = SP_OBJECT (l->data);
if (SP_IS_ITEM(o)) {
SPItem *child = SP_ITEM(o);
NR::Matrix const ct(child->transform * transform);
- sp_item_invoke_bbox_full(child, bbox, ct, flags, FALSE);
+ sp_item_invoke_bbox_full(child, &dummy_bbox, ct, flags, FALSE);
}
l = g_slist_remove (l, o);
}
+
+ *bbox = NRRect(dummy_bbox);
}
void CGroup::onPrint(SPPrintContext *ctx) {