summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2009-03-15 22:10:43 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2009-03-15 22:10:43 +0000
commit7fe5d57fe8762253b743c760c5126aa912466191 (patch)
treee533d289fe40f43fde011d2fedfe16ac0dd1d557 /src/live_effects/effect.cpp
parentEnvelope Deform LPE is no longer experimental (diff)
downloadinkscape-7fe5d57fe8762253b743c760c5126aa912466191.tar.gz
inkscape-7fe5d57fe8762253b743c760c5126aa912466191.zip
correctly implement 'resetDefaults()' for LPEs. Now when applying an LPE, all default values are written to SVG. This greatly improves future compatibility.
(bzr r7499)
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index f67ee28a7..3cdb21d6a 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -647,7 +647,11 @@ Effect::editNextParamOncanvas(SPItem * item, SPDesktop * desktop)
void
Effect::resetDefaults(SPItem * /*item*/)
{
- // do nothing for simple effects
+ std::vector<Inkscape::LivePathEffect::Parameter *>::iterator p;
+ for (p = param_vector.begin(); p != param_vector.end(); ++p) {
+ (*p)->param_set_default();
+ (*p)->write_to_SVG();
+ }
}
void