From: buliabyak Date: Thu, 17 Apr 2008 02:41:01 +0000 (+0000) Subject: use the user-specified bounding box type X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=093eedd4d0da6b6d3eeb15824ea9a4457bbcc663;p=inkscape.git use the user-specified bounding box type --- diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index f996abe7a..825bd7ac1 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -64,7 +64,10 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) using NR::X; using NR::Y; if ( sel && !sel->isEmpty() ) { - NR::Maybe const bbox(sel->bounds()); + int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0); + SPItem::BBoxType bbox_type = (prefs_bbox ==0)? + SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; + NR::Maybe const bbox(sel->bounds(bbox_type)); if ( bbox && !bbox->isEmpty() ) { UnitTracker *tracker = reinterpret_cast(g_object_get_data(G_OBJECT(spw), "tracker")); SPUnit const &unit = *tracker->getActiveUnit(); @@ -151,7 +154,10 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) SPDocument *document = sp_desktop_document(desktop); sp_document_ensure_up_to_date (document); - NR::Maybe bbox = selection->bounds(); + int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0); + SPItem::BBoxType bbox_type = (prefs_bbox ==0)? + SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; + NR::Maybe bbox = selection->bounds(bbox_type); if ( !bbox || bbox->isEmpty() ) { g_object_set_data(G_OBJECT(spw), "update", GINT_TO_POINTER(FALSE));