fix: Shortcut migration not working correctly in some cases

Fixes #2045
This commit is contained in:
WerWolv
2025-01-03 10:16:22 +01:00
parent a55df1d111
commit d8fb3f526a
5 changed files with 13 additions and 2 deletions

View File

@@ -154,6 +154,14 @@ 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.