From d59ab0cc036239f5e2f6040b2f439ba7b55af4c3 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Fri, 8 Aug 2014 09:47:46 -0400 Subject: Ponyscape feature: finish pen drawing on context switch (bzr r13090.1.101) --- src/ui/tools/pen-tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 9a73d497f..318591df5 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -239,7 +239,9 @@ void PenTool::finish() { sp_event_context_discard_delayed_snap_event(this); if (this->npoints != 0) { - this->_cancel(); + // switching context - finish path + this->ea = NULL; // unset end anchor if set (otherwise crashes) + this->_finish(false); } FreehandBase::finish(); -- cgit v1.2.3