diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-03-04 21:53:51 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-03-04 21:53:51 +0000 |
| commit | 8f1fc5ef79529834fd8f191ec4cc8b29505058ca (patch) | |
| tree | 26284303f4aa4bd86692b0f4aec35d810a283bb8 /src/desktop-events.cpp | |
| parent | We don't really need two separate "Shadows" and "Shadows and glows" submenus,... (diff) | |
| download | inkscape-8f1fc5ef79529834fd8f191ec4cc8b29505058ca.tar.gz inkscape-8f1fc5ef79529834fd8f191ec4cc8b29505058ca.zip | |
A better fix for bug #331864 (snap-delay related)
(bzr r7417)
Diffstat (limited to 'src/desktop-events.cpp')
| -rw-r--r-- | src/desktop-events.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index a947e6f17..8f5b53246 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -72,6 +72,7 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge static bool dragging = false; static SPCanvasItem *guide = NULL; static Geom::Point normal; + static bool snap_delay_temporarily_active = false; int wx, wy; SPDesktop *desktop = dtw->desktop; @@ -98,6 +99,7 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge // In such a situation, we're already in that specific context and the snap delay is already active. We should // not set the snap delay to active again, because that will trigger a similar warning to the one above sp_canvas_set_snap_delay_active(desktop->canvas, true); + snap_delay_temporarily_active = true; } Geom::Point const event_w(sp_canvas_window_to_world(dtw->canvas, event_win)); @@ -179,6 +181,13 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge m.guideSnap(event_dt, normal); dragging = false; + + // See the comments in GDK_BUTTON_PRESS + if (snap_delay_temporarily_active) { + sp_canvas_set_snap_delay_active(desktop->canvas, false); + snap_delay_temporarily_active = false; + } + gtk_object_destroy(GTK_OBJECT(guide)); guide = NULL; if ((horiz ? wy : wx) >= 0) { |
