summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9bd64cf)
raw | patch | inline | side by side (parent: 9bd64cf)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 21 Sep 2009 21:20:17 +0000 (21:20 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 21 Sep 2009 21:20:17 +0000 (21:20 +0000) |
src/event-context.cpp | patch | blob | history |
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 753d0679aea0a84e8e65d1ac41aee1b43de46575..958e8cb2b3d3056124c3b6e688a1efcf99494882 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -1181,8 +1181,12 @@ void sp_event_context_snap_delay_handler(SPEventContext *ec, SPItem* const item,
bool const c1 = event->state & GDK_BUTTON2_MASK; // We shouldn't hold back any events when other mouse buttons have been
bool const c2 = event->state & GDK_BUTTON3_MASK; // pressed, e.g. when scrolling with the middle mouse button; if we do then
// Inkscape will get stuck in an unresponsive state
-
- if (c1 || c2) {
+ bool const c3 = tools_isactive(ec->desktop, TOOLS_CALLIGRAPHIC);
+ // The snap delay will repeat the last motion event, which will lead to
+ // erroneous points in the calligraphy context. And because we don't snap
+ // in this context, we might just as well disable the snap delay all together
+
+ if (c1 || c2 || c3) {
// Make sure that we don't send any pending snap events to a context if we know in advance
// that we're not going to snap any way (e.g. while scrolling with middle mouse button)
// Any motion event might affect the state of the context, leading to unexpected behavior