X-Git-Url: https://git.pterodactylus.net/?p=synfig.git;a=blobdiff_plain;f=synfig-studio%2Fsrc%2Fgui%2Fstates%2Fstate_smoothmove.cpp;h=3b4f36ca08c4f16ac5c6d70797cedd06a17599dc;hp=d2227cc87c63dd6304317271aae9000aea02992f;hb=87cee9053c40cf19f3b1473beed8af05a512ba95;hpb=961d8b11ca07964cb96baf5a32870cef5d8f62fe diff --git a/synfig-studio/src/gui/states/state_smoothmove.cpp b/synfig-studio/src/gui/states/state_smoothmove.cpp index d2227cc..3b4f36c 100644 --- a/synfig-studio/src/gui/states/state_smoothmove.cpp +++ b/synfig-studio/src/gui/states/state_smoothmove.cpp @@ -155,18 +155,36 @@ StateSmoothMove::~StateSmoothMove() void StateSmoothMove_Context::load_settings() { - String value; - - if(settings.get_value("smooth_move.radius",value)) - set_radius(atof(value.c_str())); - else - set_radius(1.0f); + try + { + SETTINGS_LOCALE_SAFE_AND_BACKUP + String value; + + if(settings.get_value("smooth_move.radius",value)) + set_radius(atof(value.c_str())); + else + set_radius(1.0f); + SETTINGS_LOCALE_RESTORE + } + 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 + { + SETTINGS_LOCALE_SAFE_AND_BACKUP + settings.set_value("smooth_move.radius",strprintf("%f",get_radius())); + SETTINGS_LOCALE_RESTORE + } + catch(...) + { + synfig::warning("State SmoothMove: Caught exception when attempting to save settings."); + } } StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view):