summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-01-31 13:51:52 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-01-31 13:51:52 +0000
commit07d32ff9bade493f2549e8e90c32d11ba12b199d (patch)
treee23af978f1919af10ac80d315f90d8323bb2d0ee /src/desktop.cpp
parent* [INTL:pl] Further small updates to the Polish translation (diff)
downloadinkscape-07d32ff9bade493f2549e8e90c32d11ba12b199d.tar.gz
inkscape-07d32ff9bade493f2549e8e90c32d11ba12b199d.zip
Store the snapper tolerances in the snap-preferences instead of in each snapper individualy. This way we don't have to update all snappers when the namedview has been updated (and we can get rid of the _update_snap_distances() call)
(bzr r7208)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 85df3af04..1f2baccbb 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -104,7 +104,6 @@ static void _layer_hierarchy_changed(SPObject *top, SPObject *bottom, SPDesktop
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.
@@ -1698,12 +1697,6 @@ _namedview_modified (SPObject *obj, guint flags, SPDesktop *desktop)
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);
@@ -1758,33 +1751,6 @@ _namedview_modified (SPObject *obj, guint flags, SPDesktop *desktop)
}
}
-/**
- * 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;