X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Fsrc%2Fgui%2Fstates%2Fstate_smoothmove.cpp;h=3b4f36ca08c4f16ac5c6d70797cedd06a17599dc;hb=87cee9053c40cf19f3b1473beed8af05a512ba95;hp=f42df35eb9437e295ea80ba5ad54ff2876ab656e;hpb=45dc3b3e85f218337b52ec3a9b027678f6c6397a;p=synfig.git diff --git a/synfig-studio/src/gui/states/state_smoothmove.cpp b/synfig-studio/src/gui/states/state_smoothmove.cpp index f42df35..3b4f36c 100644 --- a/synfig-studio/src/gui/states/state_smoothmove.cpp +++ b/synfig-studio/src/gui/states/state_smoothmove.cpp @@ -49,7 +49,7 @@ #include "event_mouse.h" #include "event_layerclick.h" #include "toolbox.h" -#include "dialog_tooloptions.h" +#include "docks/dialog_tooloptions.h" #include #include "duck.h" #include "onemoment.h" @@ -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):