From 6b8572be4bdae9ee79fc42c9d18fd9882dec21aa Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 23 Nov 2008 13:55:26 +0000 Subject: 1) Improve the way the distance to the pointer is taken into account when finding the best snap 2) Use this distance also when snapping nodes in the path editor 3) Add a slider in the preferences dialog to control the weighing of this distance (bzr r6895) --- src/seltrans.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 614ce7584..34ea17a64 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1413,10 +1413,9 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state) /* Pick one */ Inkscape::SnappedPoint best_snapped_point; - g_assert(best_snapped_point.getDistance() == NR_HUGE); for (std::list::const_iterator i = s.begin(); i != s.end(); i++) { if (i->getSnapped()) { - if (i->getDistance() < best_snapped_point.getDistance()) { + if (best_snapped_point.isOtherOneBetter(*i, true)) { best_snapped_point = *i; dxy = i->getTransformation(); } -- cgit v1.2.3