diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index c80def78786f2dee63ad867379ada857d1db749d..54b07a02a76f05287b7a8b2fce27a78b85902344 100644 (file)
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
@@ -140,7 +140,7 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
Inkscape::Snapper::ConstraintLine(p[1] - p[0]));
/* Choose the best snap and update points accordingly */
- if (s[0].getDistance() < s[1].getDistance()) {
+ if (s[0].getSnapDistance() < s[1].getSnapDistance()) {
if (s[0].getSnapped()) {
p[0] = s[0].getPoint();
p[1] = 2 * center - s[0].getPoint();
@@ -178,7 +178,7 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
s[0] = m.freeSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, to_2geom(p[0]));
s[1] = m.freeSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, to_2geom(p[1]));
- if (s[0].getDistance() < s[1].getDistance()) {
+ if (s[0].getSnapDistance() < s[1].getSnapDistance()) {
if (s[0].getSnapped()) {
p[0] = s[0].getPoint();
p[1] = 2 * center - s[0].getPoint();
@@ -204,11 +204,11 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
}
if (snappoint.getSnapped()) {
- desktop->snapindicator->set_new_snappoint(snappoint);
+ desktop->snapindicator->set_new_snaptarget(snappoint);
}
- p[0] = sp_desktop_dt2root_xy_point(desktop, p[0]);
- p[1] = sp_desktop_dt2root_xy_point(desktop, p[1]);
+ p[0] = sp_desktop_dt2doc_xy_point(desktop, p[0]);
+ p[1] = sp_desktop_dt2doc_xy_point(desktop, p[1]);
return Geom::Rect(Geom::Point(MIN(p[0][Geom::X], p[1][Geom::X]), MIN(p[0][Geom::Y], p[1][Geom::Y])),
Geom::Point(MAX(p[0][Geom::X], p[1][Geom::X]), MAX(p[0][Geom::Y], p[1][Geom::Y])));