From 7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Oct 2008 13:03:09 -0500 Subject: From trunk (bzr r6885) --- src/sp-rect.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/sp-rect.cpp') diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index 36e64614e..ab0ea3d72 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -30,7 +30,7 @@ #include #include "xml/repr.h" #include "sp-guide.h" -#include "prefs-utils.h" +#include "preferences.h" #define noRECT_VERBOSE @@ -47,7 +47,7 @@ static Geom::Matrix sp_rect_set_transform(SPItem *item, Geom::Matrix const &xfor static void sp_rect_convert_to_guides(SPItem *item); static void sp_rect_set_shape(SPShape *shape); -static void sp_rect_snappoints(SPItem const *item, SnapPointsIter p); +static void sp_rect_snappoints(SPItem const *item, SnapPointsIter p, Inkscape::SnapPreferences const *snapprefs); static SPShapeClass *parent_class; @@ -546,7 +546,7 @@ sp_rect_get_visible_height(SPRect *rect) /** * Sets the snappoint p to the unrounded corners of the rectangle */ -static void sp_rect_snappoints(SPItem const *item, SnapPointsIter p) +static void sp_rect_snappoints(SPItem const *item, SnapPointsIter p, Inkscape::SnapPreferences const *snapprefs) { /* This method overrides sp_shape_snappoints, which is the default for any shape. The default method returns all eight points along the path of a rounded rectangle, but not the real corners. Snapping @@ -572,7 +572,8 @@ void sp_rect_convert_to_guides(SPItem *item) { SPRect *rect = SP_RECT(item); - if (prefs_get_int_attribute("tools.shapes.rect", "convertguides", 1) == 0) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (!prefs->getBool("/tools/shapes/rect/convertguides", true)) { sp_item_convert_to_guides(SP_ITEM(rect)); return; } -- cgit v1.2.3