From 1062e1a7ca8527b934d3de184d1abdf42aa1e401 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Mon, 21 Sep 2009 21:20:17 +0000 Subject: fix by Diederik for 422972 (bzr r8627) --- src/event-context.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/event-context.cpp') diff --git a/src/event-context.cpp b/src/event-context.cpp index 753d0679a..958e8cb2b 100644 --- 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 -- cgit v1.2.3