From 63d732ef4c6d3ee46fc743768274d407de6f876a Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 7 Sep 2008 15:12:57 +0000 Subject: If a snapper needs a reference to a SPNamedView or a SPDesktop, then get that reference via the SnapManager (instead of storing references in the snapper and accessing them directly) (bzr r6773) --- src/snapper.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/snapper.cpp') diff --git a/src/snapper.cpp b/src/snapper.cpp index 35aa012dc..51ffaa42d 100644 --- a/src/snapper.cpp +++ b/src/snapper.cpp @@ -23,11 +23,10 @@ Inkscape::Snapper::PointType const Inkscape::Snapper::SNAPPOINT_GUIDE = 0x4; * \param nv Named view. * \param d Snap tolerance. */ -Inkscape::Snapper::Snapper(SPNamedView const *nv, Geom::Coord const t) : _named_view(nv), _snap_enabled(true), _snapper_tolerance(t) +Inkscape::Snapper::Snapper(SnapManager const *sm, Geom::Coord const t) : _snapmanager(sm), _snap_enabled(true), _snapper_tolerance(t) { - g_assert(_named_view != NULL); - g_assert(SP_IS_NAMEDVIEW(_named_view)); - + g_assert(_snapmanager != NULL); + setSnapFrom(SNAPPOINT_BBOX | SNAPPOINT_NODE, true); //Snap any point. In v0.45 and earlier, this was controlled in the preferences tab } -- cgit v1.2.3