summaryrefslogtreecommitdiffstats
path: root/src/pen-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-04-18 09:29:33 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-04-18 09:29:33 +0000
commitd15fa557388c3a9903ffb89d321a997e55bdc2df (patch)
tree8a19d337b6bae7e90db1c596f9cdfb18ed08d467 /src/pen-context.cpp
parentSwitched pen and pencil toobars to stock GTK+ toolbars (diff)
downloadinkscape-d15fa557388c3a9903ffb89d321a997e55bdc2df.tar.gz
inkscape-d15fa557388c3a9903ffb89d321a997e55bdc2df.zip
Fixed: Shift-doubleclicking middle mouse button in pen tool should not finish the path being drawn
(bzr r2925)
Diffstat (limited to 'src/pen-context.cpp')
-rw-r--r--src/pen-context.cpp8
1 files 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;
}