X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsnapped-point.cpp;h=52f0a7839b0468c10035ed913711822124733bdd;hb=8a2e76b7021b9b960d7c30801a1a14461d9b5939;hp=48efa10e6fd3dacb1c51ee0ac7b6f311c0cf751a;hpb=73c1af0b516326a946c9579fca598d1025426732;p=inkscape.git diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp index 48efa10e6..52f0a7839 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 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; }