From 98d4e7826b44154cbe89747a1d27f033fb012755 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 2 Jul 2011 15:07:10 +0200 Subject: Be accurate when changing width/height in the toolbar, in case geometric bounding boxes are used (bzr r10403) --- src/widgets/select-toolbar.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') 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, -- cgit v1.2.3