summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba8fa4e)
raw | patch | inline | side by side (parent: ba8fa4e)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Mon, 8 Feb 2010 20:39:21 +0000 (21:39 +0100) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Mon, 8 Feb 2010 20:39:21 +0000 (21:39 +0100) |
src/pencil-context.cpp | patch | blob | history |
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index f6bb827434b81befb3a05879e34ed0b4e2f8c84a..9f9c187f37cb6adf1d4e76338222ad2b4d09462b 100644 (file)
--- 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;
}
pc->red_curve_is_valid = false;
if (in_svg_plane(p)) {
pc->p[pc->npoints++] = p;
- pc->ps.push_back(p);
}
}