summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/toolbar/pencil-toolbar.cpp3
-rw-r--r--src/ui/tools/pen-tool.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/toolbar/pencil-toolbar.cpp b/src/ui/toolbar/pencil-toolbar.cpp
index e781bf3bb..5d7fabe4a 100644
--- a/src/ui/toolbar/pencil-toolbar.cpp
+++ b/src/ui/toolbar/pencil-toolbar.cpp
@@ -252,6 +252,9 @@ PencilToolbar::mode_changed(int mode)
if (_simplify) {
_simplify->set_visible(visible);
}
+ if (tools_isactive(_desktop, TOOLS_FREEHAND_PEN)) {
+ SP_PEN_CONTEXT(_desktop->event_context)->setPolylineMode();
+ }
}
/* This is used in generic functions below to share large portions of code between pen and pencil tool */
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index 70ab0f8db..d17c0d772 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -429,7 +429,7 @@ bool PenTool::_handleButtonPress(GdkEventButton const &bevent) {
// This is allowed, if we just canceled curve
case PenTool::POINT:
if (this->npoints == 0) {
- this->setPolylineMode();
+ this->_bsplineSpiroColor();
Geom::Point p;
if ((bevent.state & GDK_CONTROL_MASK) && (this->polylines_only || this->polylines_paraxial)) {
p = event_dt;
@@ -508,7 +508,6 @@ bool PenTool::_handleButtonPress(GdkEventButton const &bevent) {
this->_setSubsequentPoint(p, true);
}
}
- this->_bsplineSpiroColor();
// avoid the creation of a control point so a node is created in the release event
this->state = (this->spiro || this->bspline || this->polylines_only) ? PenTool::POINT : PenTool::CONTROL;
ret = true;