summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da5dec7)
raw | patch | inline | side by side (parent: da5dec7)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Fri, 12 Feb 2010 18:58:21 +0000 (19:58 +0100) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Fri, 12 Feb 2010 18:58:21 +0000 (19:58 +0100) |
src/snap.cpp | patch | blob | history |
diff --git a/src/snap.cpp b/src/snap.cpp
index 9ee575e22e789731df282b06058af3884179e8ad..3cac53ebe6d74eeb90dac9b01ccb5d93f28c126c 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -354,12 +354,14 @@ Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::SnapCandidatePoint
Inkscape::Snapper::ConstraintLine const &constraint,
Geom::OptRect const &bbox_to_snap) const
{
+ // First project the mouse pointer onto the constraint
+ Geom::Point pp = constraint.projection(p.getPoint());
+
if (!someSnapperMightSnap()) {
- return Inkscape::SnappedPoint(p, Inkscape::SNAPTARGET_UNDEFINED, NR_HUGE, 0, false, false);
+ // The constraint should always be enforce, so we return pp here instead of p
+ return Inkscape::SnappedPoint(pp, Inkscape::SNAPTARGET_UNDEFINED, NR_HUGE, 0, false, false);
}
- // First project the mouse pointer onto the constraint
- Geom::Point pp = constraint.projection(p.getPoint());
// Then try to snap the projected point
Inkscape::SnapCandidatePoint candidate(pp, p.getSourceType(), p.getSourceNum(), Inkscape::SNAPTARGET_UNDEFINED, Geom::Rect());