From 98c5d6fa24a4b182f66eedb7af1f436c4b466ddd Mon Sep 17 00:00:00 2001 From: cilix42 Date: Wed, 18 Apr 2007 09:29:33 +0000 Subject: [PATCH] Fixed: Shift-doubleclicking middle mouse button in pen tool should not finish the path being drawn --- src/pen-context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 0f8a4204a..ac4a8accb 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -59,7 +59,7 @@ static void spdc_pen_finish(SPPenContext *pc, gboolean closed); static gint pen_handle_button_press(SPPenContext *const pc, GdkEventButton const &bevent); static gint pen_handle_motion_notify(SPPenContext *const pc, GdkEventMotion const &mevent); static gint pen_handle_button_release(SPPenContext *const pc, GdkEventButton const &revent); -static gint pen_handle_2button_press(SPPenContext *const pc); +static gint pen_handle_2button_press(SPPenContext *const pc, GdkEventButton const &bevent); static gint pen_handle_key_press(SPPenContext *const pc, GdkEvent *event); static void spdc_reset_colors(SPPenContext *pc); @@ -308,7 +308,7 @@ sp_pen_context_root_handler(SPEventContext *ec, GdkEvent *event) break; case GDK_2BUTTON_PRESS: - ret = pen_handle_2button_press(pc); + ret = pen_handle_2button_press(pc, event->button); break; case GDK_KEY_PRESS: @@ -710,10 +710,10 @@ pen_handle_button_release(SPPenContext *const pc, GdkEventButton const &revent) } static gint -pen_handle_2button_press(SPPenContext *const pc) +pen_handle_2button_press(SPPenContext *const pc, GdkEventButton const &bevent) { gint ret = FALSE; - if (pc->npoints != 0) { + if (pc->npoints != 0 && bevent.button != 2) { spdc_pen_finish(pc, FALSE); ret = TRUE; } -- 2.30.2