diff options
| author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-21 12:16:56 +0200 |
|---|---|---|
| committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-21 12:16:56 +0200 |
| commit | 77c97725516564f5595b2b71df54c1e32e08a7fc (patch) | |
| tree | 86887e93cad6945e1289ebd3fa9f7af3b9a01f4b /indra/newview/llfloaterpreference.cpp | |
| parent | 45b859b50b18d214559ee2da0376496da9222fdf (diff) | |
| parent | 05898105c88a2fa175bdc3d353461a6f61ad0616 (diff) | |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
| -rw-r--r-- | indra/newview/llfloaterpreference.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a333868b8c..ff568a11a9 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -313,8 +313,7 @@ F32 LLFloaterPreference::sAspectRatio = 0.0; LLFloaterPreference::LLFloaterPreference(const LLSD& key) : LLFloater(key), mGotPersonalInfo(false), - mOriginalIMViaEmail(false), - mCancelOnClose(true) + mOriginalIMViaEmail(false) { //Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>); @@ -588,9 +587,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) // when the floater is opened. That will make cancel do its // job saveSettings(); - - // This is a "fresh" floater, closing floater shoud cancel any changes - mCancelOnClose = true; } void LLFloaterPreference::onVertexShaderEnable() @@ -609,7 +605,7 @@ void LLFloaterPreference::onClose(bool app_quitting) { gSavedSettings.setS32("LastPrefTab", getChild<LLTabContainer>("pref core")->getCurrentPanelIndex()); LLPanelLogin::setAlwaysRefresh(false); - if (mCancelOnClose) cancel(); + cancel(); } void LLFloaterPreference::onOpenHardwareSettings() @@ -631,16 +627,10 @@ void LLFloaterPreference::onBtnOK() if (canClose()) { + saveSettings(); apply(); - // Here we do not want to cancel on close, so we do this funny thing - // that prevents cancel from undoing our changes when we hit OK - mCancelOnClose = false; closeFloater(false); - // closeFloater() will be called when viewer is quitting, leaving mCancelOnClose = true; - // will cancel all changes we saved here, don't let this happen. - // Fix for EXT-3465 - gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); LLUIColorTable::instance().saveUserSettings(); std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); |
