Skip to content
Snippets Groups Projects
Commit 7aa84808 authored by lat9nq's avatar lat9nq
Browse files

shared_widget: Only save global settings as needed

Fixes a potential but not reproduced issue where the custom config
is being applied to the global config.
parent 55c0b55d
No related branches found
No related tags found
No related merge requests found
......@@ -495,10 +495,12 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
if (Settings::IsConfiguringGlobal()) {
load_func = [this, serializer, checkbox_serializer, require_checkbox, other_setting]() {
if (require_checkbox) {
if (require_checkbox && other_setting->UsingGlobal()) {
other_setting->LoadString(checkbox_serializer());
}
setting.LoadString(serializer());
if (setting.UsingGlobal()) {
setting.LoadString(serializer());
}
};
} else {
layout->addWidget(restore_button);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment