summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/pen-tool.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-04-08 13:47:33 +0000
committerjabiertxof <info@marker.es>2016-04-08 13:47:33 +0000
commit1106ff9eeb561af9216563e3eb7422088fac4cf5 (patch)
tree8dc88ec1211b985e18c86835196d45e124d8cfe4 /src/ui/tools/pen-tool.cpp
parentupdate to trunk (diff)
parentBug #1552765 fixed Break Apart dont handle well stroke with in documents diff... (diff)
downloadinkscape-1106ff9eeb561af9216563e3eb7422088fac4cf5.tar.gz
inkscape-1106ff9eeb561af9216563e3eb7422088fac4cf5.zip
update to trunk
(bzr r13645.1.125)
Diffstat (limited to 'src/ui/tools/pen-tool.cpp')
-rw-r--r--src/ui/tools/pen-tool.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index 2ed366a7d..18af8e105 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -1220,7 +1220,18 @@ 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 p(0, 0);
+ if(this->red_curve->is_empty()) {
+ this->red_curve->moveto(p);
+ }
+ this->_finishSegment(p, 0);
+ this->_finish(true);
+ } else {
+ this->_finish(false);
+ }
ret = true;
}
break;
@@ -1783,12 +1794,12 @@ void PenTool::_setSubsequentPoint(Geom::Point const p, bool statusbar, guint sta
if (statusbar) {
gchar *message = is_curve ?
- _("<b>Curve segment</b>: angle %3.2f&#176;, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> to finish the path" ):
- _("<b>Line segment</b>: angle %3.2f&#176;, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> to finish the path");
+ _("<b>Curve segment</b>: angle %3.2f&#176;, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> or <b>Shift+Enter</b> to finish the path" ):
+ _("<b>Line segment</b>: angle %3.2f&#176;, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> or <b>Shift+Enter</b> to finish the path");
if(this->spiro || this->bspline){
message = is_curve ?
- _("<b>Curve segment</b>: angle %3.2f&#176;, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> to finish the path" ):
- _("<b>Line segment</b>: angle %3.2f&#176;, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> to finish the path");
+ _("<b>Curve segment</b>: angle %3.2f&#176;, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> or <b>Shift+Enter</b> to finish the path" ):
+ _("<b>Line segment</b>: angle %3.2f&#176;, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> or <b>Shift+Enter</b> to finish the path");
}
this->_setAngleDistanceStatusMessage(p, 0, message);
}