summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/random.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-04-14 22:20:13 +0000
committerJabiertxof <jtx@jtx>2017-04-14 22:20:13 +0000
commit3103b99b4cf6c1048c89f75e280761d8cd0ca1c2 (patch)
treea79bdf40cb476839681f10c61f51a3c4d860fcbc /src/live_effects/parameter/random.cpp
parentEllipses in Inkscape are defined by the center and the radius, but the (diff)
downloadinkscape-3103b99b4cf6c1048c89f75e280761d8cd0ca1c2.tar.gz
inkscape-3103b99b4cf6c1048c89f75e280761d8cd0ca1c2.zip
Allow set and reset default values of LPE parameters
(bzr r15620.1.1)
Diffstat (limited to 'src/live_effects/parameter/random.cpp')
-rw-r--r--src/live_effects/parameter/random.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/live_effects/parameter/random.cpp b/src/live_effects/parameter/random.cpp
index 075e85ee1..90e53ca0e 100644
--- a/src/live_effects/parameter/random.cpp
+++ b/src/live_effects/parameter/random.cpp
@@ -78,6 +78,20 @@ RandomParam::param_set_default()
}
void
+RandomParam::param_update_default(gdouble default_value){
+ defvalue = default_value;
+}
+
+void
+RandomParam::param_update_default(const gchar * default_value){
+ double newval;
+ unsigned int success = sp_svg_number_read_d(default_value, &newval);
+ if (success == 1) {
+ param_update_default(newval);
+ }
+}
+
+void
RandomParam::param_set_value(gdouble val, long newseed)
{
value = val;