diff options
| author | Martin Owens <doctormo@gmail.com> | 2016-03-20 02:42:23 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2016-03-20 02:42:23 +0000 |
| commit | 2ab92c531add6a786d4a9cacf41ce33381c2ffe2 (patch) | |
| tree | ab6147c665ca6828340cec8e09a7d67a8926b3a5 /src/ui/tools/pen-tool.cpp | |
| parent | Merge lp:~inkscape.dev/inkscape/copy-rotate-lpe-improvements (diff) | |
| download | inkscape-2ab92c531add6a786d4a9cacf41ce33381c2ffe2.tar.gz inkscape-2ab92c531add6a786d4a9cacf41ce33381c2ffe2.zip | |
Add Shift+Enter path complete and larger square node on mouse over.
(bzr r14721)
Diffstat (limited to 'src/ui/tools/pen-tool.cpp')
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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; |
