summaryrefslogtreecommitdiffstats
path: root/src/pen-context.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-01-14 09:31:02 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-01-14 09:31:02 +0000
commit19b7109971d305f262abb99c776a32206d8cfedd (patch)
treeb4f06a2f3594553fb6787746ea76986c3ade7a5c /src/pen-context.cpp
parentFix boost::optional warning spam (diff)
downloadinkscape-19b7109971d305f262abb99c776a32206d8cfedd.tar.gz
inkscape-19b7109971d305f262abb99c776a32206d8cfedd.zip
Do not append a segment when finishing an open path with right click
in the pen tool. Fixed bugs: - https://launchpad.net/bugs/208768 (bzr r8975)
Diffstat (limited to 'src/pen-context.cpp')
-rw-r--r--src/pen-context.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 144717332..a717537ab 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -557,20 +557,22 @@ static gint pen_handle_button_press(SPPenContext *const pc, GdkEventButton const
default:
break;
}
- } else if (bevent.button == 3 || pc->expecting_clicks_for_LPE == 1) { // when the last click for a waiting LPE occurs we want to finish the path
- if (pc->npoints != 0) {
-
- spdc_pen_finish_segment(pc, event_dt, bevent.state);
- if (pc->green_closed) {
- // finishing at the start anchor, close curve
- spdc_pen_finish(pc, TRUE);
- } else {
- // finishing at some other anchor, finish curve but not close
- spdc_pen_finish(pc, FALSE);
- }
-
- ret = TRUE;
+ } else if (pc->expecting_clicks_for_LPE == 1 && pc->npoints != 0) {
+ // when the last click for a waiting LPE occurs we want to finish the path
+ spdc_pen_finish_segment(pc, event_dt, bevent.state);
+ if (pc->green_closed) {
+ // finishing at the start anchor, close curve
+ spdc_pen_finish(pc, TRUE);
+ } else {
+ // finishing at some other anchor, finish curve but not close
+ spdc_pen_finish(pc, FALSE);
}
+
+ ret = TRUE;
+ } else if (bevent.button == 3 && pc->npoints != 0) {
+ // right click - finish path
+ spdc_pen_finish(pc, FALSE);
+ ret = TRUE;
}
if (pc->expecting_clicks_for_LPE > 0) {