diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-03-27 20:44:53 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-03-27 20:44:53 +0000 |
| commit | bb400a51918b21e0bf8d710a82995ab524c8073f (patch) | |
| tree | c05f8e8d61f7d7dfd2b342a2a3ddb297be9a2261 /src/seltrans.cpp | |
| parent | patch from bug 168024 (diff) | |
| download | inkscape-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/seltrans.cpp')
| -rw-r--r-- | src/seltrans.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 490ff4644..5ab99e147 100644 --- 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; |
