diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp
index be64438ed503d5b6282b77fed33348822f4b79b6..22a964d43487e2b1e7c20851b0e43b458c532917 100644 (file)
--- a/src/line-snapper.cpp
+++ b/src/line-snapper.cpp
Geom::Coord d = Geom::L2(gridguide_line.versor()); // length of versor, needed to normalize the versor
if (d > 0) {
Geom::Point v = l*gridguide_line.versor()/d;
- _addSnappedPoint(sc, p_proj + v, Geom::L2(pp - (p_proj + v)), p.getSourceType(), p.getSourceNum(), true);
- _addSnappedPoint(sc, p_proj - v, Geom::L2(pp - (p_proj - v)), p.getSourceType(), p.getSourceNum(), true);
+ _addSnappedPoint(sc, p_proj + v, Geom::L2(p.getPoint() - (p_proj + v)), p.getSourceType(), p.getSourceNum(), true);
+ _addSnappedPoint(sc, p_proj - v, Geom::L2(p.getPoint() - (p_proj - v)), p.getSourceType(), p.getSourceNum(), true);
}
}
} else {
if (inters) {
Geom::Point t = constraint_line.pointAt((*inters).ta);
- const Geom::Coord dist = Geom::L2(t - pp);
+ const Geom::Coord dist = Geom::L2(t - p.getPoint());
if (dist < getSnapperTolerance()) {
// When doing a constrained snap, we're already at an intersection.
// This snappoint is therefore fully constrained, so there's no need