From 2ab92c531add6a786d4a9cacf41ce33381c2ffe2 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 19 Mar 2016 22:42:23 -0400 Subject: Add Shift+Enter path complete and larger square node on mouse over. (bzr r14721) --- src/ui/tools/pen-tool.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/ui/tools/pen-tool.cpp') diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 2ed366a7d..ff49417f4 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -1220,7 +1220,19 @@ bool PenTool::_handleKeyPress(GdkEvent *event) { case GDK_KEY_KP_Enter: if (this->npoints != 0) { this->ea = NULL; // unset end anchor if set (otherwise crashes) - this->_finish(false); + if(MOD__SHIFT_ONLY(event)) { + // All this is needed to stop the last control + // point dispeating and stop making an n-1 shape. + Geom::Point const event_w(0, 0); + Geom::Point event_dt(desktop->w2d(event_w)); + if(this->red_curve->is_empty()) { + this->red_curve->moveto(event_w); + } + this->_finishSegment(event_w, 0); + this->_finish(true); + } else { + this->_finish(false); + } ret = true; } break; -- cgit v1.2.3