summaryrefslogtreecommitdiffstats
path: root/src/snap.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-01-25 20:02:13 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-01-25 20:02:13 +0000
commita3d2dbecd77fca3b2757039e329238a99676a950 (patch)
tree15eb12dad98c33f2bdee0e1a1b40681d38797b12 /src/snap.cpp
parentDisplay the snap source indicator only when snapping is enabled (diff)
downloadinkscape-a3d2dbecd77fca3b2757039e329238a99676a950.tar.gz
inkscape-a3d2dbecd77fca3b2757039e329238a99676a950.zip
Remove some SP_ACTIVE_DESKTOP() calls
(bzr r7174)
Diffstat (limited to 'src/snap.cpp')
-rw-r--r--src/snap.cpp10
1 files changed, 4 insertions, 6 deletions
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);
}
}