diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-04-17 02:41:01 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-04-17 02:41:01 +0000 |
| commit | 19c75e89142788040ac825458d961a11229b49bf (patch) | |
| tree | 2697e35f5f111b43c655e71da9e69b0a2e74a5eb /src/widgets/select-toolbar.cpp | |
| parent | replace text strings by ints for tools/bounding_box (diff) | |
| download | inkscape-19c75e89142788040ac825458d961a11229b49bf.tar.gz inkscape-19c75e89142788040ac825458d961a11229b49bf.zip | |
use the user-specified bounding box type
(bzr r5460)
Diffstat (limited to 'src/widgets/select-toolbar.cpp')
| -rw-r--r-- | src/widgets/select-toolbar.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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<NR::Rect> 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<NR::Rect> const bbox(sel->bounds(bbox_type)); if ( bbox && !bbox->isEmpty() ) { UnitTracker *tracker = reinterpret_cast<UnitTracker*>(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<NR::Rect> 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<NR::Rect> bbox = selection->bounds(bbox_type); if ( !bbox || bbox->isEmpty() ) { g_object_set_data(G_OBJECT(spw), "update", GINT_TO_POINTER(FALSE)); |
