From 8509d7dcf34dfc834f4a16cc100ec3cbc32357c2 Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Mon, 7 Dec 2009 11:59:14 -0800 Subject: Correctly read and write values for Spray Tool option on Tool Controls Bar. (bzr r8876) --- src/spray-context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/spray-context.cpp') 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") { -- cgit v1.2.3