diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2011-07-02 13:07:10 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mail@diedenrezi.nl> | 2011-07-02 13:07:10 +0000 |
| commit | 98d4e7826b44154cbe89747a1d27f033fb012755 (patch) | |
| tree | bad54a12831266e5702d95dd13472d34f6a1b612 /src/widgets/select-toolbar.cpp | |
| parent | GTK+ cleanup: gtk_type_new (diff) | |
| download | inkscape-98d4e7826b44154cbe89747a1d27f033fb012755.tar.gz inkscape-98d4e7826b44154cbe89747a1d27f033fb012755.zip | |
Be accurate when changing width/height in the toolbar, in case geometric bounding boxes are used
(bzr r10403)
Diffstat (limited to 'src/widgets/select-toolbar.cpp')
| -rw-r--r-- | src/widgets/select-toolbar.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 7012badf8..eb9b2805d 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -242,7 +242,14 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) gdouble strokewidth = stroke_average_width (selection->itemList()); int transform_stroke = prefs->getBool("/options/transform/stroke", true) ? 1 : 0; - Geom::Affine scaler = get_scale_transform_with_stroke (*bbox, strokewidth, transform_stroke, x0, y0, x1, y1); + Geom::Affine scaler; + if (bbox_type == SPItem::APPROXIMATE_BBOX) { + // get_scale_transform_with_stroke() is intended for VISUAL (or APPROXIMATE) bounding boxes, not geometrical ones! + scaler = get_scale_transform_with_stroke (*bbox, strokewidth, transform_stroke, x0, y0, x1, y1); + } else { + // we'll trick it into using a geometrical bounding box though, by setting the stroke width to zero + scaler = get_scale_transform_with_stroke (*bbox, 0, false, x0, y0, x1, y1); + } sp_selection_apply_affine(selection, scaler); DocumentUndo::maybeDone(document, actionkey, SP_VERB_CONTEXT_SELECT, |
