diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-11-24 19:45:10 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-11-24 19:45:10 +0000 |
| commit | d6704d3f6d4ed82c1360142e86538b076bb4a279 (patch) | |
| tree | 6013e6009d40a1a4a8cae513668c79e092890dc9 /src/snap.cpp | |
| parent | some color support, multi-line text, automatic scaling (diff) | |
| download | inkscape-d6704d3f6d4ed82c1360142e86538b076bb4a279.tar.gz inkscape-d6704d3f6d4ed82c1360142e86538b076bb4a279.zip | |
Add an option to the preferences to _only_ snap the node closest to the mouse pointer
(bzr r6899)
Diffstat (limited to 'src/snap.cpp')
| -rw-r--r-- | src/snap.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index f6504efe3..e89063b43 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -347,7 +347,6 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( ** Also used to globally disable all snapping */ if (someSnapperMightSnap() == false) { - g_assert(points.size() > 0); return Inkscape::SnappedPoint(); } @@ -551,7 +550,7 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( } } } else { // For all transformations other than scaling - if (best_snapped_point.isOtherOneBetter(snapped_point, true)) { + if (best_snapped_point.isOtherSnapBetter(snapped_point, true)) { best_transformation = result; best_snapped_point = snapped_point; } @@ -815,7 +814,7 @@ Inkscape::SnappedPoint SnapManager::findBestSnap(Geom::Point const &p, SnappedCo // std::cout << "sp = " << from_2geom((*i).getPoint()); if ((*i).getSnapDistance() <= (*i).getTolerance()) { // if it's the first point, or if it is closer than the best snapped point so far - if (i == sp_list.begin() || bestSnappedPoint.isOtherOneBetter(*i, false)) { + if (i == sp_list.begin() || bestSnappedPoint.isOtherSnapBetter(*i, false)) { // then prefer this point over the previous one bestSnappedPoint = *i; } |
