diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-09-07 15:12:57 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-09-07 15:12:57 +0000 |
| commit | 63d732ef4c6d3ee46fc743768274d407de6f876a (patch) | |
| tree | 9e4231bab7970e0525ec69029c468da8e5e5b3cc /src/snapper.cpp | |
| parent | Remove pointer to SPDesktop from ObjectSnapper (diff) | |
| download | inkscape-63d732ef4c6d3ee46fc743768274d407de6f876a.tar.gz inkscape-63d732ef4c6d3ee46fc743768274d407de6f876a.zip | |
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)
Diffstat (limited to 'src/snapper.cpp')
| -rw-r--r-- | src/snapper.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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 } |
