diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-02-08 20:39:21 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-02-08 20:39:21 +0000 |
| commit | e8b563dedd295eca73cde7c5e14a7af5fb105ba0 (patch) | |
| tree | 473bc1966662e9bacce55559b5527e105fa14627 /src/pencil-context.cpp | |
| parent | Really fix middle click zoom in the node tool. (diff) | |
| download | inkscape-e8b563dedd295eca73cde7c5e14a7af5fb105ba0.tar.gz inkscape-e8b563dedd295eca73cde7c5e14a7af5fb105ba0.zip | |
Second attempt at fixing LP452174 (first node in freehand is ignored)
Fixed bugs:
- https://launchpad.net/bugs/452174
(bzr r9068)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index f6bb82743..9f9c187f3 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -378,6 +378,13 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev } if ( pc->npoints != 0) { // buttonpress may have happened before we entered draw context! + if (pc->ps.size() == 0) { + // Only in freehand mode we have to add the first point also to pc->ps (apparently) + // - We cannot add this point in spdc_set_startpoint, because we only need it for freehand + // - We cannot do this in the button press handler because at that point we don't know yet + // wheter we're going into freehand mode or not + pc->ps.push_back(pc->p[0]); + } spdc_add_freehand_point(pc, p, mevent.state); ret = TRUE; } @@ -639,7 +646,6 @@ spdc_set_startpoint(SPPencilContext *const pc, Geom::Point const p) pc->red_curve_is_valid = false; if (in_svg_plane(p)) { pc->p[pc->npoints++] = p; - pc->ps.push_back(p); } } |
