From a3d2dbecd77fca3b2757039e329238a99676a950 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 25 Jan 2009 20:02:13 +0000 Subject: Remove some SP_ACTIVE_DESKTOP() calls (bzr r7174) --- src/snap.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index 7404ed12b..04521f07f 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -77,8 +77,7 @@ SnapManager::getGridSnappers() const SnapperList s; //FIXME: this code should actually do this: add new grid snappers that are active for this desktop. now it just adds all gridsnappers - SPDesktop* desktop = SP_ACTIVE_DESKTOP; - if (desktop && desktop->gridsEnabled()) { + if (_desktop && _desktop->gridsEnabled()) { for ( GSList const *l = _named_view->grids; l != NULL; l = l->next) { Inkscape::CanvasGrid *grid = (Inkscape::CanvasGrid*) l->data; s.push_back(grid->snapper); @@ -207,9 +206,8 @@ Geom::Point SnapManager::multipleOfGridPitch(Geom::Point const &t) const return t; //FIXME: this code should actually do this: add new grid snappers that are active for this desktop. now it just adds all gridsnappers - SPDesktop* desktop = SP_ACTIVE_DESKTOP; - if (desktop && desktop->gridsEnabled()) { + if (_desktop && _desktop->gridsEnabled()) { bool success = false; Geom::Point nearest_multiple; Geom::Coord nearest_distance = NR_HUGE; @@ -219,7 +217,7 @@ Geom::Point SnapManager::multipleOfGridPitch(Geom::Point const &t) const // this, so when using multiple grids one can get unexpected results // Cannot use getGridSnappers() because we need both the grids AND their snappers - // Therefor we iterate through all grids manually + // Therefore we iterate through all grids manually for (GSList const *l = _named_view->grids; l != NULL; l = l->next) { Inkscape::CanvasGrid *grid = (Inkscape::CanvasGrid*) l->data; const Inkscape::Snapper* snapper = grid->snapper; @@ -787,7 +785,7 @@ Inkscape::SnappedPoint SnapManager::findBestSnap(Geom::Point const &p, SnappedCo if (snapprefs.getSnapIntersectionCS()) { // search for the closest snapped intersection of curves Inkscape::SnappedPoint closestCurvesIntersection; - if (getClosestIntersectionCS(sc.curves, p, closestCurvesIntersection)) { + if (getClosestIntersectionCS(sc.curves, p, closestCurvesIntersection, _desktop->dt2doc())) { sp_list.push_back(closestCurvesIntersection); } } -- cgit v1.2.3