diff options
author | Jonathan Yap <jhwelch@gmail.com> | 2015-02-23 19:09:56 -0500 |
---|---|---|
committer | Jonathan Yap <jhwelch@gmail.com> | 2015-02-23 19:09:56 -0500 |
commit | b011afaa81608c1d1c19bfa808bf9c2b99e8e5c8 (patch) | |
tree | 8ec21c56fbbb19a03420e55f52004d7506ed53cf /indra | |
parent | 72f832ba8dba0e843601b70b8ef80f40c564240f (diff) |
STORM-2082 Clicking on Ok/Cancel in Advanced floater only closes it now
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 32 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml | 6 |
3 files changed, 30 insertions, 12 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 21c684ab25..3cbd5cc684 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -333,8 +333,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) registered_dialog = true; } - mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this)); - mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this)); + mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this, _2)); + mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this, _2)); mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this)); mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, this)); @@ -877,7 +877,7 @@ void LLFloaterPreference::onClose(bool app_quitting) } // static -void LLFloaterPreference::onBtnOK() +void LLFloaterPreference::onBtnOK(const LLSD& userdata) { // commit any outstanding text entry if (hasFocus()) @@ -893,7 +893,15 @@ void LLFloaterPreference::onBtnOK() { saveSettings(); apply(); - closeFloater(false); + + if (userdata.asString() == "closeadvanced") + { + LLFloaterReg::hideInstance("prefs_graphics_advanced"); + } + else + { + closeFloater(false); + } //Conversation transcript and log path changed so reload conversations based on new location if(mPriorInstantMessageLogPath.length()) @@ -938,7 +946,7 @@ void LLFloaterPreference::onBtnOK() } // static -void LLFloaterPreference::onBtnCancel() +void LLFloaterPreference::onBtnCancel(const LLSD& userdata) { if (hasFocus()) { @@ -950,7 +958,15 @@ void LLFloaterPreference::onBtnCancel() refresh(); } cancel(); - closeFloater(); + + if (userdata.asString() == "closeadvanced") + { + LLFloaterReg::hideInstance("prefs_graphics_advanced"); + } + else + { + closeFloater(); + } } // static @@ -1545,8 +1561,8 @@ void LLFloaterPreferenceGraphicsAdvanced::refresh() updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail", true), getChild<LLTextBox>("SkyMeshDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("TerrainDetail", true), getChild<LLTextBox>("TerrainDetailText", true)); setIndirectControls(); - setMaxNonImpostorsText(gSavedSettings.getU32("RenderAvatarMaxNonImpostors"),getChild<LLTextBox>("IndirectMaxNonImpostorsText", true)); - setMaxComplexityText(gSavedSettings.getU32("RenderAvatarMaxComplexity"),getChild<LLTextBox>("IndirectMaxComplexityText", true)); + setMaxNonImpostorsText(gSavedSettings.getU32("RenderAvatarMaxNonImpostors"),getChild<LLTextBox>("IndirectMaxNonImpostorsText", true)); + setMaxComplexityText(gSavedSettings.getU32("RenderAvatarMaxComplexity"),getChild<LLTextBox>("IndirectMaxComplexityText", true)); refreshEnabledState(); } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 5058e7bb23..9730722558 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -95,8 +95,8 @@ public: void getControlNames(std::vector<std::string>& names); protected: - void onBtnOK(); - void onBtnCancel(); + void onBtnOK(const LLSD& userdata); + void onBtnCancel(const LLSD& userdata); void onClickClearCache(); // Clear viewer texture cache, vfs, and VO cache on next startup void onClickBrowserClearCache(); // Clear web history and caches as well as viewer caches above diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 054337dfc0..3f68efdc70 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -870,7 +870,8 @@ top_delta="0" width="80"> <button.commit_callback - function="Pref.OK" /> + function="Pref.OK" + parameter="closeadvanced" /> </button> <button @@ -884,7 +885,8 @@ top_delta="0" width="80" > <button.commit_callback - function="Pref.Cancel" /> + function="Pref.Cancel" + parameter="closeadvanced" /> </button> </floater> |