X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Fsrc%2Fgui%2Fstates%2Fstate_smoothmove.cpp;h=36bfecde82ee06909b6f4d392e392c1c806fb372;hb=477fd4ea9c6133e098572554a9eadbf503e27fab;hp=d2227cc87c63dd6304317271aae9000aea02992f;hpb=5db17dd500c44a59e62bc52cf1c22392edc972a8;p=synfig.git diff --git a/synfig-studio/src/gui/states/state_smoothmove.cpp b/synfig-studio/src/gui/states/state_smoothmove.cpp index d2227cc..36bfecd 100644 --- a/synfig-studio/src/gui/states/state_smoothmove.cpp +++ b/synfig-studio/src/gui/states/state_smoothmove.cpp @@ -155,18 +155,34 @@ StateSmoothMove::~StateSmoothMove() void StateSmoothMove_Context::load_settings() { - String value; + try + { + synfig::ChangeLocale change_locale(LC_NUMERIC, "C"); + String value; - if(settings.get_value("smooth_move.radius",value)) - set_radius(atof(value.c_str())); - else - set_radius(1.0f); + if(settings.get_value("smooth_move.radius",value)) + set_radius(atof(value.c_str())); + else + set_radius(1.0f); + } + catch(...) + { + synfig::warning("State SmothMove: Caught exception when attempting to load settings."); + } } void StateSmoothMove_Context::save_settings() { - settings.set_value("smooth_move.radius",strprintf("%f",get_radius())); + try + { + synfig::ChangeLocale change_locale(LC_NUMERIC, "C"); + settings.set_value("smooth_move.radius",strprintf("%f",get_radius())); + } + catch(...) + { + synfig::warning("State SmoothMove: Caught exception when attempting to save settings."); + } } StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view):