summaryrefslogtreecommitdiffstats
path: root/src/spray-context.cpp
diff options
context:
space:
mode:
authorJosh Andler <scislac@gmail.com>2009-12-07 19:59:14 +0000
committerJosh Andler <scislac@gmail.com>2009-12-07 19:59:14 +0000
commit8509d7dcf34dfc834f4a16cc100ec3cbc32357c2 (patch)
tree83138f5d12a722a6f6cbcf90d8920ef4679389a5 /src/spray-context.cpp
parentThis commit hooks device-cmyk handling to color pickers. Now we have basic in... (diff)
downloadinkscape-8509d7dcf34dfc834f4a16cc100ec3cbc32357c2.tar.gz
inkscape-8509d7dcf34dfc834f4a16cc100ec3cbc32357c2.zip
Correctly read and write values for Spray Tool option on Tool Controls Bar.
(bzr r8876)
Diffstat (limited to 'src/spray-context.cpp')
-rw-r--r--src/spray-context.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index 71dc9648a..1c050ea06 100644
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
@@ -379,14 +379,14 @@ sp_spray_context_set(SPEventContext *ec, Inkscape::Preferences::Entry *val)
Glib::ustring path = val->getEntryName();
if (path == "width") {
- tc->width = CLAMP(val->getDouble(0.1), -1000.0, 1000.0);
+ tc->width = 0.01 * CLAMP(val->getInt(10), 1, 100);
} else if (path == "mode") {
tc->mode = val->getInt();
sp_spray_update_cursor(tc, false);
} else if (path == "distribution") {
tc->distrib = val->getInt(1);
} else if (path == "population") {
- tc->population = CLAMP(val->getDouble(), 0.0, 1.0);
+ tc->population = 0.01 * CLAMP(val->getInt(10), 1, 100);
} else if (path == "tilt") {
tc->tilt = CLAMP(val->getDouble(0.1), 0, 1000.0);
} else if (path == "ratio") {
@@ -402,9 +402,9 @@ sp_spray_context_set(SPEventContext *ec, Inkscape::Preferences::Entry *val)
} else if (path == "scale_max") {
tc->scale_max = CLAMP(val->getDouble(1.0), 0, 10.0);
} else if (path == "mean") {
- tc->mean = CLAMP(val->getDouble(1.0), 0, 1.0);
+ tc->mean = 0.01 * CLAMP(val->getInt(10), 1, 100);
} else if (path == "standard_deviation") {
- tc->standard_deviation = CLAMP(val->getDouble(1.0), 0, 1.0);
+ tc->standard_deviation = 0.01 * CLAMP(val->getInt(10), 1, 100);
} else if (path == "usepressure") {
tc->usepressure = val->getBool();
} else if (path == "doh") {