diff --git a/src/desktop.cpp b/src/desktop.cpp
index 85df3af0450a87286a98f4a99388343fc7507db3..1f2baccbba2ed61559eb7d0ef70362dd9832accf 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
static void _reconstruction_start(SPDesktop * desktop);
static void _reconstruction_finish(SPDesktop * desktop);
static void _namedview_modified (SPObject *obj, guint flags, SPDesktop *desktop);
-static void _update_snap_distances (SPDesktop *desktop);
/**
* Return new desktop object.
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- /* Recalculate snap distances */
- /* FIXME: why is the desktop getting involved in setting up something
- ** that is entirely to do with the namedview?
- */
- _update_snap_distances (desktop);
-
/* Show/hide page background */
if (nv->pagecolor & 0xff) {
sp_canvas_item_show (desktop->table);
}
}
-/**
- * Callback to reset snapper's distances.
- */
-static void
-_update_snap_distances (SPDesktop *desktop)
-{
- SPUnit const &px = sp_unit_get_by_id(SP_UNIT_PX);
-
- SPNamedView &nv = *desktop->namedview;
-
- //tell all grid snappers
- for ( GSList const *l = nv.grids; l != NULL; l = l->next) {
- Inkscape::CanvasGrid *grid = (Inkscape::CanvasGrid*) l->data;
- grid->snapper->setSnapperTolerance(sp_convert_distance_full(nv.gridtolerance,
- *nv.gridtoleranceunit,
- px));
- }
-
- nv.snap_manager.guide.setSnapperTolerance(sp_convert_distance_full(nv.guidetolerance,
- *nv.guidetoleranceunit,
- px));
- nv.snap_manager.object.setSnapperTolerance(sp_convert_distance_full(nv.objecttolerance,
- *nv.objecttoleranceunit,
- px));
-}
-
-
Geom::Matrix SPDesktop::w2d() const
{
return _w2d;