summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/pen-tool.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2016-03-20 02:42:23 +0000
committerMartin Owens <doctormo@gmail.com>2016-03-20 02:42:23 +0000
commit2ab92c531add6a786d4a9cacf41ce33381c2ffe2 (patch)
treeab6147c665ca6828340cec8e09a7d67a8926b3a5 /src/ui/tools/pen-tool.cpp
parentMerge lp:~inkscape.dev/inkscape/copy-rotate-lpe-improvements (diff)
downloadinkscape-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.cpp14
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;