projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Bug: Saved settings should be locale independent - ID: 3111032
[synfig.git]
/
synfig-studio
/
src
/
gui
/
states
/
state_rotate.cpp
diff --git
a/synfig-studio/src/gui/states/state_rotate.cpp
b/synfig-studio/src/gui/states/state_rotate.cpp
index
53ee7c9
..
e582835
100644
(file)
--- a/
synfig-studio/src/gui/states/state_rotate.cpp
+++ b/
synfig-studio/src/gui/states/state_rotate.cpp
@@
-158,18
+158,36
@@
StateRotate::~StateRotate()
void
StateRotate_Context::load_settings()
{
void
StateRotate_Context::load_settings()
{
- String value;
-
- if(settings.get_value("rotate.scale",value) && value=="0")
- set_scale_flag(false);
- else
- set_scale_flag(true);
+ try
+ {
+ SETTINGS_LOCALE_SAFE_AND_BACKUP
+ String value;
+
+ if(settings.get_value("rotate.scale",value) && value=="0")
+ set_scale_flag(false);
+ else
+ set_scale_flag(true);
+ SETTINGS_LOCALE_RESTORE
+ }
+ catch(...)
+ {
+ synfig::warning("State Rotate: Caught exception when attempting to load settings.");
+ }
}
void
StateRotate_Context::save_settings()
{
}
void
StateRotate_Context::save_settings()
{
- settings.set_value("rotate.scale",get_scale_flag()?"1":"0");
+ try
+ {
+ SETTINGS_LOCALE_SAFE_AND_BACKUP
+ settings.set_value("rotate.scale",get_scale_flag()?"1":"0");
+ SETTINGS_LOCALE_RESTORE
+ }
+ catch(...)
+ {
+ synfig::warning("State Rotate: Caught exception when attempting to save settings.");
+ }
}
StateRotate_Context::StateRotate_Context(CanvasView* canvas_view):
}
StateRotate_Context::StateRotate_Context(CanvasView* canvas_view):