diff --git a/src/desktop.cpp b/src/desktop.cpp
index d31babf87cb1f365a0dfe11e95353fc912ace79d..feb3f5cb0287ece3a51a8a05af074332473f98c4 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
}
}
+void SPDesktop::toggleSnapping()
+{
+ bool v = namedview->snap_manager.getSnapEnabledGlobally();
+ Inkscape::XML::Node *repr = SP_OBJECT_REPR(namedview);
+ sp_repr_set_boolean(repr, "inkscape:snap-global", !v);
+}
//----------------------------------------------------------------------
// Callback implementations. The virtual ones are connected by the view.