diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2019-05-01 17:42:37 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mail@diedenrezi.nl> | 2019-05-01 17:42:37 +0000 |
| commit | 7dd5c6f7f9d6d07517e7933fd43b46b833088227 (patch) | |
| tree | d16d51d9e3220b3e988bf6d5a60b547273e4479e /src/ui/tools | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| parent | Select filter on each LPE add dialog to easy remove or modify. Also improve L... (diff) | |
| download | inkscape-7dd5c6f7f9d6d07517e7933fd43b46b833088227.tar.gz inkscape-7dd5c6f7f9d6d07517e7933fd43b46b833088227.zip | |
Merge branch 'master' of gitlab.com:inkscape/inkscape
Diffstat (limited to 'src/ui/tools')
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 84933b929..8ba3a8d7b 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -1531,19 +1531,6 @@ void PenTool::_bsplineSpiroMotion(guint const state){ if (this->sa && this->green_curve->is_unset()) { this->sa_overwrited = tmp_curve->copy(); } - if (!this->green_bpaths.empty()) { - this->green_curve = tmp_curve->copy(); - // remove old piecewise green canvasitems - for (auto i: this->green_bpaths) { - sp_canvas_item_destroy(i); - } - this->green_bpaths.clear(); - // one canvas bpath for all of green_curve - SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), this->green_curve, true); - sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(canvas_shape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); - sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(canvas_shape), 0, SP_WIND_RULE_NONZERO); - this->green_bpaths.push_back(canvas_shape); - } } if (cubic) { if (this->bspline) { @@ -1591,7 +1578,18 @@ void PenTool::_bsplineSpiroMotion(guint const state){ this->_bsplineSpiroEndAnchorOn(); } } - + if (!this->green_bpaths.empty()) { + // remove old piecewise green canvasitems + for (auto i: this->green_bpaths) { + sp_canvas_item_destroy(i); + } + this->green_bpaths.clear(); + } + // one canvas bpath for all of green_curve + SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), this->green_curve, true); + sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(canvas_shape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); + sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(canvas_shape), 0, SP_WIND_RULE_NONZERO); + this->green_bpaths.push_back(canvas_shape); this->_bsplineSpiroBuild(); } |
