diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-03-03 21:55:48 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-03-03 21:55:48 +0000 |
| commit | 318c2fee72da98b2d69653ca23924f252b34fa42 (patch) | |
| tree | 1a2b7109112023eae6a121cee1ef58e5fef956b1 /src/display/sp-canvas.cpp | |
| parent | add my name to the 2geom readme, so people can mail me with questions (diff) | |
| download | inkscape-318c2fee72da98b2d69653ca23924f252b34fa42.tar.gz inkscape-318c2fee72da98b2d69653ca23924f252b34fa42.zip | |
Fix bug #291795 again
(bzr r7409)
Diffstat (limited to 'src/display/sp-canvas.cpp')
| -rw-r--r-- | src/display/sp-canvas.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 38b0ae995..75a1f4e63 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1609,7 +1609,12 @@ sp_canvas_motion (GtkWidget *widget, GdkEventMotion *event) SPDesktop *dt = SP_ACTIVE_DESKTOP; - if (canvas->context_snap_delay_active && dt && dt->namedview->snap_manager.snapprefs.getSnapEnabledGlobally()) { + // Snapping occurs when dragging with the left mouse button down, or when hovering e.g. in the pen tool with left mouse button up + 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 (canvas->context_snap_delay_active && !c1 && !c2 && dt && dt->namedview->snap_manager.snapprefs.getSnapEnabledGlobally()) { // Snap when speed drops below e.g. 0.02 px/msec, or when no motion events have occurred for some period. // i.e. snap when we're at stand still. A speed threshold enforces snapping for tablets, which might never // be fully at stand still and might keep spitting out motion events. |
