summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0adfd75)
raw | patch | inline | side by side (parent: 0adfd75)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 27 Mar 2008 20:44:53 +0000 (20:44 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 27 Mar 2008 20:44:53 +0000 (20:44 +0000) |
src/seltrans.cpp | patch | blob | history | |
src/sp-item-group.cpp | patch | blob | history |
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 490ff4644ece120c51aa80b4b1bd737ba3766250..5ab99e147b5c76d517a70ce5dc1258564ce84dbc 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -278,7 +278,11 @@ void Inkscape::SelTrans::grab(NR::Point const &p, gdouble x, gdouble y, bool sho
_approximate_bbox = selection->bounds(SPItem::APPROXIMATE_BBOX); // Used for correctly scaling the strokewidth
_geometric_bbox = selection->bounds(SPItem::GEOMETRIC_BBOX);
_point = p;
- _point_geom = _geometric_bbox->min() + _geometric_bbox->dimensions() * NR::scale(x, y);
+ if (_geometric_bbox) {
+ _point_geom = _geometric_bbox->min() + _geometric_bbox->dimensions() * NR::scale(x, y);
+ } else {
+ _point_geom = p;
+ }
// Next, get all points to consider for snapping
SnapManager const &m = _desktop->namedview->snap_manager;
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index 7969c1bc106c5e66168c77ab89473c6d8bf5b66d..d0a1d9111710a4edb88402c1f10d3f65165eb559 100644 (file)
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
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);
}
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) {