diff options
| author | jtx <javier.arraiza@marker.es> | 2015-07-27 10:21:31 +0000 |
|---|---|---|
| committer | jtx <javier.arraiza@marker.es> | 2015-07-27 10:21:31 +0000 |
| commit | 3f83712a0ae1400d8ffa8dc0d40247b78f6d1a7a (patch) | |
| tree | 36de9451cbd68b5d2f6e29bf692ffd9d3ea30b33 /src/ui/tools/freehand-base.cpp | |
| parent | add flattern button to interactive simplify (diff) | |
| download | inkscape-3f83712a0ae1400d8ffa8dc0d40247b78f6d1a7a.tar.gz inkscape-3f83712a0ae1400d8ffa8dc0d40247b78f6d1a7a.zip | |
Fix LPE stack in interactive simplify
(bzr r14262)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index 865ee760e..2d742b6bf 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -288,6 +288,14 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (item && SP_IS_LPE_ITEM(item)) { + bool simplify = prefs->getInt(tool_name(dc) + "/simplify", 0); + if(simplify){ + double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0); + tol = tol/(100.0*(102.0-tol)); + std::ostringstream ss; + ss << tol; + spdc_apply_simplify(ss.str(), dc, item); + } if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1) { Effect::createAndApply(SPIRO, dc->desktop->doc(), item); } @@ -303,14 +311,6 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, shapeType shape = (shapeType)prefs->getInt(tool_name(dc) + "/shape", 0); - bool simplify = prefs->getInt(tool_name(dc) + "/simplify", 0); - if(simplify){ - double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0); - tol = tol/(100.0*(101.0-tol)); - std::ostringstream ss; - ss << tol; - spdc_apply_simplify(ss.str(), dc, item); - } bool shape_applied = false; SPCSSAttr *css_item = sp_css_attr_from_object(item, SP_STYLE_FLAG_ALWAYS); const char *cstroke = sp_repr_css_property(css_item, "stroke", "none"); |
