summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/options-dialog.cpp')
-rw-r--r--gui/options-dialog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 7eb6f68d..c35a6b52 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -33,7 +33,10 @@ QString OptionsDialog::kopts_to_string(const key_opts& kopts)
void OptionsDialog::set_disable_translation_state(bool value)
{
- QSettings(OPENTRACK_ORG).setValue("disable-translation", value);
+ group::with_global_settings_object([&](QSettings& s)
+ {
+ s.setValue("disable-translation", value);
+ });
}
OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
@@ -88,7 +91,10 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
tie_setting(main.neck_enable, ui.neck_enable);
- ui.disable_translation->setChecked(QSettings(OPENTRACK_ORG).value("disable-translation", false).toBool());
+ const bool is_translation_disabled = group::with_global_settings_object([] (QSettings& s) {
+ return s.value("disable-translation", false).toBool();
+ });
+ ui.disable_translation->setChecked(is_translation_disabled);
struct tmp
{