From 0b9f1821ef6908d509c4b2a4c94fb0df35e6079a Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 13 Apr 2007 20:49:26 +0000 Subject: New Grids are now ready to go. bug testing can start i think. (bzr r2878) --- src/snap.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index e9bdb7063..4f871e736 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -23,6 +23,9 @@ #include "display/canvas-grid.h" +#include "inkscape.h" +#include "desktop.h" + /** * Construct a SnapManager for a SPNamedView. * @@ -50,16 +53,14 @@ SnapManager::SnapperList SnapManager::getSnappers() const s.push_back(&guide); s.push_back(&object); - //add new grid snappers that are active for this desktop -// SPDesktop* desktop = SP_ACTIVE_DESKTOP; -// if (desktop) { - + //FIXME: this code should do this: add new grid snappers that are active for this desktop + SPDesktop* desktop = SP_ACTIVE_DESKTOP; + 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); } - -// } + } return s; } -- cgit v1.2.3