summaryrefslogtreecommitdiffstats
path: root/src/pen-context.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-01-14 16:01:49 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-01-14 16:01:49 +0000
commitbbab47c6c933e1e1c3f851db87076fc885b3c53b (patch)
treec4595e3c98a260bab48d37a342b3fdc4002fd6b6 /src/pen-context.cpp
parentRe-enable snapping on release, for now. (diff)
parentMerge GSoC 2009 node tool rewrite (diff)
downloadinkscape-bbab47c6c933e1e1c3f851db87076fc885b3c53b.tar.gz
inkscape-bbab47c6c933e1e1c3f851db87076fc885b3c53b.zip
Merge from trunk
(bzr r8846.2.17)
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) {