summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6633131)
raw | patch | inline | side by side (parent: 6633131)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 14 Apr 2007 02:30:34 +0000 (02:30 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 14 Apr 2007 02:30:34 +0000 (02:30 +0000) |
src/selcue.cpp | patch | blob | history | |
src/seltrans.cpp | patch | blob | history |
diff --git a/src/selcue.cpp b/src/selcue.cpp
index 1831e8b54a24b869c047b029ffcc2f6ade5344ca..5a831d831ce173e9e32fade63c1df0be1a06d1d8 100644 (file)
--- a/src/selcue.cpp
+++ b/src/selcue.cpp
SPItem *item = (SPItem *) l->data;
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::APPROXIMATE_BBOX;
+ SPItem::BBoxType bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX;
NR::Maybe<NR::Rect> const b = sp_item_bbox_desktop(item, bbox_type);
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 3de87ae28e2d343dc7ba18ff0ca34f924fcc633d..82632d45693b65d416534dc79f7f545a6a8f2080 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
_show(SHOW_CONTENT),
_grabbed(false),
_show_handles(true),
- _snap_bbox_type(SPItem::GEOMETRIC_BBOX),
_bbox(NR::Nothing()),
_approximate_bbox(NR::Nothing()),
_chandle(NULL),
_stamp_cache(NULL),
_message_context(desktop->messageStack())
{
+ gchar const *prefs_bbox = prefs_get_string_attribute("tools.select", "bounding_box");
+ _snap_bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX;
g_return_if_fail(desktop != NULL);
@@ -791,8 +792,9 @@ gboolean Inkscape::SelTrans::handleRequest(SPKnot *knot, NR::Point *position, gu
void Inkscape::SelTrans::_selChanged(Inkscape::Selection *selection)
{
if (!_grabbed) {
+ // reread in case it changed on the fly:
gchar const *prefs_bbox = prefs_get_string_attribute("tools.select", "bounding_box");
- _snap_bbox_type = (prefs_bbox == NULL || strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX;
+ _snap_bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX;
//SPItem::APPROXIMATE_BBOX will be replaced by SPItem::VISUAL_BBOX, as soon as the latter is implemented properly
_updateVolatileState();