diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-11-25 20:51:17 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-11-25 20:51:17 +0000 |
| commit | 0bd9f7e209d522dbcebe0449a91397fdd9e38977 (patch) | |
| tree | 834c7d02456658b57625ab68cc28f7854a5a85dc /src/snapped-point.cpp | |
| parent | Fix handling of x and y attributes of patterns (diff) | |
| parent | Fix ruler redraw issue on GTK 2.22 (diff) | |
| download | inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.tar.gz inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.zip | |
Merge from trunk
(bzr r9508.1.70)
Diffstat (limited to 'src/snapped-point.cpp')
| -rw-r--r-- | src/snapped-point.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp index 29e094a7c..2db3d62e4 100644 --- a/src/snapped-point.cpp +++ b/src/snapped-point.cpp @@ -61,7 +61,7 @@ Inkscape::SnappedPoint::SnappedPoint() { _point = Geom::Point(0,0); _source = SNAPSOURCE_UNDEFINED, - _source_num = 0, + _source_num = -1, _target = SNAPTARGET_UNDEFINED, _at_intersection = false; _constrained_snap = false; @@ -81,7 +81,7 @@ Inkscape::SnappedPoint::SnappedPoint(Geom::Point const &p) { _point = p; _source = SNAPSOURCE_UNDEFINED, - _source_num = 0, + _source_num = -1, _target = SNAPTARGET_UNDEFINED, _at_intersection = false; _fully_constrained = false; @@ -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()) { @@ -127,7 +127,7 @@ bool getClosestSP(std::list<Inkscape::SnappedPoint> const &list, Inkscape::Snapp bool Inkscape::SnappedPoint::isOtherSnapBetter(Inkscape::SnappedPoint const &other_one, bool weighted) const { - if (!other_one.getSnapped()) { + if (getSnapped() && !other_one.getSnapped()) { return false; } |
