diff --git a/src/desktop.cpp b/src/desktop.cpp
index ea002b872810d105bfa4e8137ba7d88f6a5e17c0..4727f3e511e564de3194df3cf7fc9a2e78eea74d 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
#include "message-context.h"
#include "layer-manager.h"
#include "event-log.h"
+#include "display/canvas-grid.h"
namespace Inkscape { namespace XML { class Node; }}
SPNamedView &nv = *desktop->namedview;
+
+ // FIXME GRID: make one gridsnapper object that snaps to all enabled grids by calling their snappers.
nv.snap_manager.grid.setDistance(sp_convert_distance_full(nv.gridtolerance,
*nv.gridtoleranceunit,
px));
nv.snap_manager.axonomgrid.setDistance(sp_convert_distance_full(nv.gridtolerance,
*nv.gridtoleranceunit,
px));
+ //new grid snappers
+ for ( GSList const *l = nv.grids; l != NULL; l = l->next) {
+ Inkscape::CanvasGrid *grid = (Inkscape::CanvasGrid*) l->data;
+ grid->snapper->setDistance(sp_convert_distance_full(nv.gridtolerance,
+ *nv.gridtoleranceunit,
+ px));
+ }
+
nv.snap_manager.guide.setDistance(sp_convert_distance_full(nv.guidetolerance,
*nv.guidetoleranceunit,
px));