diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index 30062504cfd03d81f91f01b4bd7e2d74026eca51..8e4b6384cfdcfca51e35df41b8c43b8df4b58a8d 100644 (file)
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
#include "message-stack.h"
#include "context-fns.h"
#include "snap.h"
-#include "desktop-affine.h"
#include "event-context.h"
#include "sp-namedview.h"
#include "display/snap-indicator.h"
@@ -133,11 +132,11 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
/* Try to snap p[0] (the opposite corner) along the constraint vector */
s[0] = m.constrainedSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, to_2geom(p[0]), Inkscape::SNAPSOURCE_HANDLE,
- Inkscape::Snapper::ConstraintLine(p[0] - p[1]));
+ Inkscape::Snapper::ConstraintLine(p[0] - p[1]), false);
/* Try to snap p[1] (the dragged corner) along the constraint vector */
s[1] = m.constrainedSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, to_2geom(p[1]), Inkscape::SNAPSOURCE_HANDLE,
- Inkscape::Snapper::ConstraintLine(p[1] - p[0]));
+ Inkscape::Snapper::ConstraintLine(p[1] - p[0]), false);
/* Choose the best snap and update points accordingly */
if (s[0].getSnapDistance() < s[1].getSnapDistance()) {
@@ -158,7 +157,7 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
/* Our origin is the opposite corner. Snap the drag point along the constraint vector */
p[0] = center;
snappoint = m.constrainedSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, to_2geom(p[1]), Inkscape::SNAPSOURCE_HANDLE,
- Inkscape::Snapper::ConstraintLine(p[1] - p[0]));
+ Inkscape::Snapper::ConstraintLine(p[1] - p[0]), false);
if (snappoint.getSnapped()) {
p[1] = snappoint.getPoint();
}
@@ -207,8 +206,8 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
desktop->snapindicator->set_new_snaptarget(snappoint);
}
- p[0] = sp_desktop_dt2doc_xy_point(desktop, p[0]);
- p[1] = sp_desktop_dt2doc_xy_point(desktop, p[1]);
+ p[0] *= desktop->dt2doc();
+ p[1] *= desktop->dt2doc();
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])));