diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-02-12 18:58:21 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-02-12 18:58:21 +0000 |
| commit | 27dcd5655a0e3c257e987fd0113df629ea4e33ba (patch) | |
| tree | 3c6812f8d34c270f5de1bc40450b6dd5b6f7108d /src | |
| parent | Correct fix from r9070 so that it doesn't break path highlighting (diff) | |
| download | inkscape-27dcd5655a0e3c257e987fd0113df629ea4e33ba.tar.gz inkscape-27dcd5655a0e3c257e987fd0113df629ea4e33ba.zip | |
Constrained snapping: always enforce constraint, even when we didn't snap
(bzr r9082)
Diffstat (limited to 'src')
| -rw-r--r-- | src/snap.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index 9ee575e22..3cac53ebe 100644 --- 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()); |
