Code

Cmake: Improve Gtkmm dependency checking, add new files to CMakeLists.txts, remove...
[inkscape.git] / src / selcue.cpp
index 5a831d831ce173e9e32fade63c1df0be1a06d1d8..48df1cf8a814478f7bc07cf3e1b071a48919a33f 100644 (file)
@@ -12,6 +12,8 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
+#include <string.h>
+
 #include "desktop-handles.h"
 #include "selection.h"
 #include "display/sp-canvas-util.h"
@@ -75,12 +77,13 @@ void Inkscape::SelCue::_updateItemBboxes()
 
     g_return_if_fail(_selection != NULL);
 
+    int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0);
+    SPItem::BBoxType bbox_type = (prefs_bbox ==0)? 
+        SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
+    
     for (GSList const *l = _selection->itemList(); l != NULL; l = l->next) {
         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;
-
         NR::Maybe<NR::Rect> const b = sp_item_bbox_desktop(item, bbox_type);
 
         SPCanvasItem* box = NULL;