From f873250f0c426d7b281acd37d65c4e549eb204a3 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Fri, 24 Jul 2015 21:38:06 +0200 Subject: Make persistence of snap indicator configurable, and clean up the snapping tab in the preferences dialog Fixed bugs: - https://launchpad.net/bugs/1420301 (bzr r14253) --- src/ui/tools/tool-base.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ui/tools') diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h index 7a6ab83e7..58eb6f88e 100644 --- a/src/ui/tools/tool-base.h +++ b/src/ui/tools/tool-base.h @@ -75,7 +75,12 @@ public: Inkscape::Preferences *prefs = Inkscape::Preferences::get(); double value = prefs->getDoubleLimited("/options/snapdelay/value", 0, 0, 1000); - _timer_id = g_timeout_add(value, &sp_event_context_snap_watchdog_callback, this); + // We used to have this specified in milliseconds; this has changed to seconds now for consistency's sake + if (value > 1) { // Apparently we have an old preference file, this value must have been in milliseconds; + value = value / 1000.0; // now convert this value to seconds + } + + _timer_id = g_timeout_add(value*1000.0, &sp_event_context_snap_watchdog_callback, this); _event = gdk_event_copy((GdkEvent*) event); ((GdkEventMotion *)_event)->time = GDK_CURRENT_TIME; -- cgit v1.2.3