diff options
-rw-r--r-- | doc/contributions.txt | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index c5db396c97..15169b30b5 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -610,6 +610,7 @@ Jonathan Yap STORM-1788 STORM-1799 STORM-1796 + STORM-1842 Kadah Coba STORM-1060 Jondan Lundquist @@ -1262,6 +1263,7 @@ Zi Ree VWR-24017 VWR-25588 STORM-1790 + STORM-1842 Zipherius Turas VWR-76 VWR-77 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 49fbdbf1df..c0197db4fc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -622,6 +622,7 @@ LLAppViewer::LLAppViewer() : mPurgeOnExit(false), mSecondInstance(false), mSavedFinalSnapshot(false), + mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded. mForceGraphicsDetail(false), mQuitRequested(false), mLogoutRequestSent(false), @@ -1739,6 +1740,13 @@ bool LLAppViewer::cleanup() { llinfos << "Not saving per-account settings; don't know the account name yet." << llendl; } + // Only save per account settings if the previous login succeeded, otherwise + // we might end up with a cleared out settings file in case a previous login + // failed after loading per account settings. + else if (!mSavePerAccountSettings) + { + llinfos << "Not saving per-account settings; last login was not successful." << llendl; + } else { gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); @@ -4953,6 +4961,10 @@ void LLAppViewer::handleLoginComplete() mOnLoginCompleted(); writeDebugInfo(); + + // we logged in successfully, so save settings on logout + llinfos << "Login successful, per account settings will be saved on log out." << llendl; + mSavePerAccountSettings=TRUE; } // *TODO - generalize this and move DSO wrangling to a helper class -brad diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 71a7868191..a3d19301e7 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -251,6 +251,7 @@ private: bool mPurgeOnExit; bool mSavedFinalSnapshot; + bool mSavePerAccountSettings; // only save per account settings if login succeeded bool mForceGraphicsDetail; |