summaryrefslogtreecommitdiffstats
path: root/src/object-snapper.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-04-17 02:40:23 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-04-17 02:40:23 +0000
commit59db065f39b26434907a247e3249058176f6034a (patch)
tree0d968ff42d814b25b813bdf2b49f76acfa939022 /src/object-snapper.cpp
parentfix by kur9kin for endless loop from bug 212332 (diff)
downloadinkscape-59db065f39b26434907a247e3249058176f6034a.tar.gz
inkscape-59db065f39b26434907a247e3249058176f6034a.zip
replace text strings by ints for tools/bounding_box
(bzr r5459)
Diffstat (limited to 'src/object-snapper.cpp')
-rw-r--r--src/object-snapper.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index f05422770..a91014158 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -156,8 +156,9 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::Snapper::PointType const &
g_assert(!(p_is_a_node && p_is_a_bbox || p_is_a_bbox && p_is_a_guide || p_is_a_node && p_is_a_guide));
if (_snap_to_bboxnode) {
- gchar const *prefs_bbox = prefs_get_string_attribute("tools", "bounding_box");
- bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX;
+ int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0);
+ bbox_type = (prefs_bbox ==0)?
+ SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
}
for (std::vector<SPItem*>::const_iterator i = _candidates->begin(); i != _candidates->end(); i++) {
@@ -265,8 +266,9 @@ void Inkscape::ObjectSnapper::_collectPaths(Inkscape::Snapper::PointType const &
bool p_is_a_node = t & Inkscape::Snapper::SNAPPOINT_NODE;
if (_snap_to_bboxpath) {
- gchar const *prefs_bbox = prefs_get_string_attribute("tools", "bounding_box");
- bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX;
+ int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0);
+ bbox_type = (prefs_bbox ==0)?
+ SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
}
// Consider the page border for snapping