summaryrefslogtreecommitdiffhomepage
path: root/opentrack/options.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/options.hpp')
-rw-r--r--opentrack/options.hpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/opentrack/options.hpp b/opentrack/options.hpp
index 7eeda198..16760df5 100644
--- a/opentrack/options.hpp
+++ b/opentrack/options.hpp
@@ -167,10 +167,12 @@ namespace options {
string name() { return group_name; }
void reload() {
- QMutexLocker l(&mtx);
- saved = group(group_name);
- transient = saved;
- modified = false;
+ {
+ QMutexLocker l(&mtx);
+ saved = group(group_name);
+ transient = saved;
+ modified = false;
+ }
emit reloading();
}
@@ -198,10 +200,12 @@ namespace options {
}
void save()
{
- QMutexLocker l(&mtx);
- modified = false;
- saved = transient;
- transient.save();
+ {
+ QMutexLocker l(&mtx);
+ modified = false;
+ saved = transient;
+ transient.save();
+ }
emit saving();
}