diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-10-24 11:14:28 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-10-24 11:14:28 +0000 |
| commit | 4b6620f3ed40dadba7f517f8321dedacbe48d393 (patch) | |
| tree | d8aa812e8c157edfb8fc3791d5578d86ea906403 /src | |
| parent | Some UI fixes (diff) | |
| download | inkscape-4b6620f3ed40dadba7f517f8321dedacbe48d393.tar.gz inkscape-4b6620f3ed40dadba7f517f8321dedacbe48d393.zip | |
Fix paraxial pen tool: apply constraint even if we didn't snap
(bzr r9847)
Diffstat (limited to 'src')
| -rw-r--r-- | src/snap.cpp | 8 | ||||
| -rw-r--r-- | src/snapped-point.cpp | 2 | ||||
| -rw-r--r-- | src/snapped-point.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index cac3824ab..e14ef6ae9 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -179,7 +179,7 @@ void SnapManager::freeSnapReturnByRef(Geom::Point &p, Geom::OptRect const &bbox_to_snap) const { Inkscape::SnappedPoint const s = freeSnap(Inkscape::SnapCandidatePoint(p, source_type), bbox_to_snap); - s.getPoint(p); + s.getPointIfSnapped(p); } @@ -343,7 +343,7 @@ void SnapManager::constrainedSnapReturnByRef(Geom::Point &p, Geom::OptRect const &bbox_to_snap) const { Inkscape::SnappedPoint const s = constrainedSnap(Inkscape::SnapCandidatePoint(p, source_type), constraint, bbox_to_snap); - s.getPoint(p); + p = s.getPoint(); // If we didn't snap, then we will return the point projected onto the constraint } /** @@ -498,7 +498,7 @@ void SnapManager::guideFreeSnap(Geom::Point &p, Geom::Point const &guide_normal, Inkscape::SnappedPoint const s = findBestSnap(candidate, sc, false, false); - s.getPoint(p); + s.getPointIfSnapped(p); } /** @@ -542,7 +542,7 @@ void SnapManager::guideConstrainedSnap(Geom::Point &p, SPGuide const &guideline) } Inkscape::SnappedPoint const s = findBestSnap(candidate, sc, false); - s.getPoint(p); + s.getPointIfSnapped(p); } /** diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp index 48efa10e6..22daf9103 100644 --- a/src/snapped-point.cpp +++ b/src/snapped-point.cpp @@ -100,7 +100,7 @@ Inkscape::SnappedPoint::~SnappedPoint() { } -void Inkscape::SnappedPoint::getPoint(Geom::Point &p) const +void Inkscape::SnappedPoint::getPointIfSnapped(Geom::Point &p) const { // When we have snapped if (getSnapped()) { diff --git a/src/snapped-point.h b/src/snapped-point.h index 4b4882ee4..a28712e85 100644 --- a/src/snapped-point.h +++ b/src/snapped-point.h @@ -48,7 +48,7 @@ public: * to, because it only returns a point if snapping has actually occurred * (by overwriting p) */ - void getPoint(Geom::Point &p) const; + void getPointIfSnapped(Geom::Point &p) const; /* This method however always returns a point, even if no snapping * has occurred; A check should be implemented in the calling code |
