summaryrefslogtreecommitdiffstats
path: root/src/common-context.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2009-07-07 02:00:16 +0000
committertweenk <tweenk@users.sourceforge.net>2009-07-07 02:00:16 +0000
commitb1985b0ec045e42934ff801a3f0de70f7405ee11 (patch)
treed505983b20c439395e70865d164ef814a3766891 /src/common-context.cpp
parentKhmer translations updated (diff)
downloadinkscape-b1985b0ec045e42934ff801a3f0de70f7405ee11.tar.gz
inkscape-b1985b0ec045e42934ff801a3f0de70f7405ee11.zip
Fix LP #390162: Wrong defaults for Calligraphy tool
(bzr r8223)
Diffstat (limited to 'src/common-context.cpp')
-rw-r--r--src/common-context.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/common-context.cpp b/src/common-context.cpp
index 48a7f308c..2229f3a23 100644
--- a/src/common-context.cpp
+++ b/src/common-context.cpp
@@ -166,19 +166,20 @@ static void sp_common_context_set(SPEventContext *ec, Inkscape::Preferences::Ent
if (full_path.compare(0, presets_path.size(), presets_path) == 0) return;
if (path == "mass") {
- ctx->mass = CLAMP(value->getDouble(0.2), -1000.0, 1000.0);
+ ctx->mass = 0.01 * CLAMP(value->getInt(10), 0, 100);
} else if (path == "wiggle") {
- ctx->drag = CLAMP((1 - value->getDouble(1 - DRAG_DEFAULT)), DRAG_MIN, DRAG_MAX); // drag is inverse to wiggle
+ ctx->drag = CLAMP((1 - 0.01 * value->getInt()),
+ DRAG_MIN, DRAG_MAX); // drag is inverse to wiggle
} else if (path == "angle") {
ctx->angle = CLAMP(value->getDouble(), -90, 90);
} else if (path == "width") {
- ctx->width = CLAMP(value->getDouble(0.1), -1000.0, 1000.0);
+ ctx->width = 0.01 * CLAMP(value->getInt(10), 1, 100);
} else if (path == "thinning") {
- ctx->vel_thin = CLAMP(value->getDouble(0.1), -1.0, 1.0);
+ ctx->vel_thin = 0.01 * CLAMP(value->getInt(10), -100, 100);
} else if (path == "tremor") {
- ctx->tremor = CLAMP(value->getDouble(), 0.0, 1.0);
+ ctx->tremor = 0.01 * CLAMP(value->getInt(), 0, 100);
} else if (path == "flatness") {
- ctx->flatness = CLAMP(value->getDouble(1.0), 0, 1.0);
+ ctx->flatness = 0.01 * CLAMP(value->getInt(), 0, 100);
} else if (path == "usepressure") {
ctx->usepressure = value->getBool();
} else if (path == "usetilt") {