mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Settings onChange handlers running more than once in some cases
This commit is contained in:
@@ -118,7 +118,7 @@ namespace hex::plugin::builtin {
|
||||
auto newValue = widget->store();
|
||||
|
||||
// Write new value to settings
|
||||
ContentRegistry::Settings::write<nlohmann::json>(category.unlocalizedName, setting.unlocalizedName, newValue);
|
||||
ContentRegistry::Settings::impl::getSetting(category.unlocalizedName, setting.unlocalizedName, newValue) = newValue;
|
||||
|
||||
// Print a debug message
|
||||
log::debug("Setting [{} / {}]: Value was changed to {}", category.unlocalizedName.get(), setting.unlocalizedName.get(), nlohmann::to_string(newValue));
|
||||
@@ -131,6 +131,8 @@ namespace hex::plugin::builtin {
|
||||
m_restartRequested = true;
|
||||
m_triggerPopup = true;
|
||||
}
|
||||
|
||||
ContentRegistry::Settings::impl::store();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user