mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Settings not being saved correctly anymore
This commit is contained in:
@@ -154,18 +154,10 @@ namespace hex {
|
||||
if (!s_settings.isValid())
|
||||
return;
|
||||
|
||||
for (const auto &category : getSettings()) {
|
||||
for (const auto &subCategory : category.subCategories) {
|
||||
for (const auto &entry : subCategory.entries) {
|
||||
(*s_settings)[category.unlocalizedName][entry.unlocalizedName] = entry.widget->store();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const auto &settingsData = *s_settings;
|
||||
|
||||
// During a crash settings can be empty, causing them to be overwritten.
|
||||
if (settingsData.empty()) {
|
||||
if (s_settings->empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user