summaryrefslogtreecommitdiffstats
path: root/src/snapper.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-11-23 19:39:52 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-11-23 19:39:52 +0000
commit41b44dbd48e963c098f64e4cc0cfdacc2c853fe7 (patch)
tree86560b262f98534365a34c9de8ea849852058097 /src/snapper.cpp
parent1) Improve the way the distance to the pointer is taken into account when fin... (diff)
downloadinkscape-41b44dbd48e963c098f64e4cc0cfdacc2c853fe7.tar.gz
inkscape-41b44dbd48e963c098f64e4cc0cfdacc2c853fe7.zip
Don't use SP_ACTIVE_DESKTOP
(bzr r6896)
Diffstat (limited to 'src/snapper.cpp')
-rw-r--r--src/snapper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/snapper.cpp b/src/snapper.cpp
index 79f30fa3c..3dd58737e 100644
--- a/src/snapper.cpp
+++ b/src/snapper.cpp
@@ -41,7 +41,9 @@ void Inkscape::Snapper::setSnapperTolerance(Geom::Coord const d)
*/
Geom::Coord Inkscape::Snapper::getSnapperTolerance() const
{
- return _snapper_tolerance / SP_ACTIVE_DESKTOP->current_zoom();
+ SPDesktop const *dt = _snapmanager->getDesktop();
+ double const zoom = dt ? dt->current_zoom() : 1;
+ return _snapper_tolerance / zoom;
}
bool Inkscape::Snapper::getSnapperAlwaysSnap() const