summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/freehand-base.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-08-01 14:27:30 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-08-01 14:27:30 +0000
commitaeedb1dda68d5529363a144c13d26f8804da4c64 (patch)
tree4ed65edbd94c98e9aafee4bec3813e8b8be84466 /src/ui/tools/freehand-base.cpp
parentfix for 1478636 (crash on import when comments in defs) (diff)
downloadinkscape-aeedb1dda68d5529363a144c13d26f8804da4c64.tar.gz
inkscape-aeedb1dda68d5529363a144c13d26f8804da4c64.zip
Update simplify interactive to handle trinagle out powerstrokes, also fix it for Spiro paths. Updated toolbar slider to also update powerstroke points
(bzr r14271)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
-rw-r--r--src/ui/tools/freehand-base.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index fa45d8dbb..f4ad284c7 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -289,7 +289,7 @@ static void spdc_apply_simplify(std::string threshold, FreehandBase *dc, SPItem
Effect::createAndApply(SIMPLIFY, dc->desktop->doc(), item);
Effect* lpe = SP_LPE_ITEM(item)->getCurrentLPE();
- // write powerstroke parameters:
+ // write simplify parameters:
lpe->getRepr()->setAttribute("steps", "1");
lpe->getRepr()->setAttribute("threshold", threshold);
lpe->getRepr()->setAttribute("smooth_angles", "360");
@@ -314,20 +314,22 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item,
std::ostringstream ss;
ss << tol;
spdc_apply_simplify(ss.str(), dc, item);
+ sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
}
if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1) {
Effect::createAndApply(SPIRO, dc->desktop->doc(), item);
}
- //add the bspline node in the waiting effects
+
if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2) {
Effect::createAndApply(BSPLINE, dc->desktop->doc(), item);
}
+ SPShape *sp_shape = dynamic_cast<SPShape *>(item);
+ if (sp_shape) {
+ curve = sp_shape->getCurve();
+ }
//Store the clipboard path to apply in the future without the use of clipboard
-
static Geom::PathVector previous_shape_pathv;
-
-
shapeType shape = (shapeType)prefs->getInt(tool_name(dc) + "/shape", 0);
bool shape_applied = false;