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/snapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/snapper.cpp') diff --git a/src/snapper.cpp b/src/snapper.cpp index 7e4568160..79f30fa3c 100644 --- a/src/snapper.cpp +++ b/src/snapper.cpp @@ -22,7 +22,7 @@ Inkscape::Snapper::Snapper(SnapManager const *sm, Geom::Coord const t) : _snapmanager(sm), _snap_enabled(true), - _snapper_tolerance(t) + _snapper_tolerance(std::max(t, 1.0)) { g_assert(_snapmanager != NULL); } @@ -33,7 +33,7 @@ Inkscape::Snapper::Snapper(SnapManager const *sm, Geom::Coord const t) : */ void Inkscape::Snapper::setSnapperTolerance(Geom::Coord const d) { - _snapper_tolerance = d; + _snapper_tolerance = std::max(d, 1.0); } /** -- cgit v1.2.3