diff --git a/src/gui/handler.cpp b/src/gui/handler.cpp index 35c51d07..5ead8684 100644 --- a/src/gui/handler.cpp +++ b/src/gui/handler.cpp @@ -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); diff --git a/src/gui/main_win.cpp b/src/gui/main_win.cpp index 1d097e43..06a31e73 100644 --- a/src/gui/main_win.cpp +++ b/src/gui/main_win.cpp @@ -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");