mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Userlist is now saved when applying edits.
As opposed to when the application message loop ends. This fixes #351. The saving of settings has also been moved to a more appropriate point.
This commit is contained in:
@@ -486,6 +486,9 @@ namespace loot {
|
||||
g_app_state.CurrentGame().userlist.AddPlugin(newUserlistEntry);
|
||||
}
|
||||
|
||||
// Save edited userlist.
|
||||
g_app_state.CurrentGame().userlist.Save(g_app_state.CurrentGame().UserlistPath());
|
||||
|
||||
// Now rederive the derived metadata.
|
||||
BOOST_LOG_TRIVIAL(trace) << "Returning newly derived display metadata.";
|
||||
YAML::Node derivedMetadata = GenerateDerivedMetadata(newUserlistEntry.Name());
|
||||
@@ -1167,6 +1170,7 @@ namespace loot {
|
||||
#endif
|
||||
|
||||
g_app_state.UpdateSettings(settings);
|
||||
g_app_state.SaveSettings();
|
||||
|
||||
// Cancel any javascript callbacks.
|
||||
browser_side_router_->OnBeforeClose(browser);
|
||||
|
||||
@@ -135,10 +135,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmd
|
||||
if (hMutex != NULL)
|
||||
ReleaseMutex(hMutex);
|
||||
|
||||
// Now save LOOT's settings and user metadata.
|
||||
g_app_state.CurrentGame().userlist.Save(g_app_state.CurrentGame().UserlistPath());
|
||||
g_app_state.SaveSettings();
|
||||
|
||||
// Delete the folders CEF generates that LOOT doesn't need.
|
||||
boost::filesystem::remove_all(boost::filesystem::current_path() / "locales");
|
||||
boost::filesystem::remove_all(boost::filesystem::current_path() / "pdf.dll");
|
||||
|
||||
Reference in New Issue
Block a user