diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2011-04-17 12:51:06 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2011-04-17 12:51:06 +0000 |
| commit | 70829da1b189d6d8f07f12d97b9273d56dbd789e (patch) | |
| tree | d041efcd3a74ce09398665b066a0bd891dad2fde /src/extension/internal/bluredge.cpp | |
| parent | change spinbox to new one in many places. (diff) | |
| download | inkscape-70829da1b189d6d8f07f12d97b9273d56dbd789e.tar.gz inkscape-70829da1b189d6d8f07f12d97b9273d56dbd789e.zip | |
add new preference widget for a number with a unit.
change Preferences > Steps to this new widget
(bzr r10177)
Diffstat (limited to 'src/extension/internal/bluredge.cpp')
| -rw-r--r-- | src/extension/internal/bluredge.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index 8ec09d11e..76582ab05 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -59,7 +59,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View int steps = module->get_param_int("num-steps"); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - double old_offset = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0); + double old_offset = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0, "px"); using Inkscape::Util::GSListConstIterator; // TODO need to properly refcount the items, at least @@ -97,10 +97,10 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View if (offset < 0.0) { /* Doing an inset here folks */ offset *= -1.0; - prefs->setDouble("/options/defaultoffsetwidth/value", offset); + prefs->setDoubleUnit("/options/defaultoffsetwidth/value", offset, "px"); sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(desktop), NULL); } else if (offset > 0.0) { - prefs->setDouble("/options/defaultoffsetwidth/value", offset); + prefs->setDoubleUnit("/options/defaultoffsetwidth/value", offset, "px"); sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(desktop), NULL); } @@ -110,7 +110,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View Inkscape::GC::release(new_group); } - prefs->setDouble("/options/defaultoffsetwidth/value", old_offset); + prefs->setDoubleUnit("/options/defaultoffsetwidth/value", old_offset, "px"); selection->clear(); selection->add(items.begin(), items.end()); |
