diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-01-13 18:17:32 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-01-13 18:17:32 +0000 |
| commit | 30493d6d028485e65dd0fb61ea9978c7b128e817 (patch) | |
| tree | 04e31f55683821e8a109bdf9a5eb9f9f39ffbfe0 /src/sp-item.cpp | |
| parent | * [INTL: pl] Updated Polish translation by Tomek ArgasiĆski (diff) | |
| download | inkscape-30493d6d028485e65dd0fb61ea9978c7b128e817.tar.gz inkscape-30493d6d028485e65dd0fb61ea9978c7b128e817.zip | |
Use visual/geometric bbox (as specified in Selector tool preferences) when converting to guidelines. Also, provide options to convert rectangles and 3D boxes using their bbox, too (i.e., disregarding their true shapes).
(bzr r4477)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index f24bf6ecc..7b3687607 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -34,6 +34,8 @@ #include "attributes.h" #include "document.h" #include "uri.h" +#include "inkscape.h" +#include "desktop-handles.h" #include "style.h" #include <glibmm/i18n.h> @@ -1579,9 +1581,15 @@ sp_item_first_item_child (SPObject *obj) void sp_item_convert_to_guides(SPItem *item) { - NR::Maybe<NR::Rect> bbox = sp_item_bbox_desktop(item, SPItem::GEOMETRIC_BBOX); + SPDesktop *dt = inkscape_active_desktop(); + SPNamedView *nv = sp_desktop_namedview(dt); + + gchar const *prefs_bbox = prefs_get_string_attribute("tools.select", "bounding_box"); + SPItem::BBoxType bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::RENDERING_BBOX; + + NR::Maybe<NR::Rect> bbox = sp_item_bbox_desktop(item, bbox_type); if (!bbox) { - g_print ("Cannot determine bounding box. Doing nothing.\n"); + g_warning ("Cannot determine item's bounding box during conversion to guides.\n"); return; } |
