diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-05-18 17:59:15 +0300 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-05-18 17:59:15 +0300 |
commit | bf0a0de466ad036065e4ce8ee034af341857a5a3 (patch) | |
tree | 9220d9cf82c72906a6563bd719731dd7f7665371 /indra/newview/llpanelgrouproles.cpp | |
parent | d3cfb6ca36d2e4624fff626fbf8ab0ed7bc8ec59 (diff) |
ext-7106 FIX Always prevent tab switching while processing tab switch request
reviwed by Mike Antipov at https://codereview.productengine.com/secondlife/r/402/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
-rw-r--r-- | indra/newview/llpanelgrouproles.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 93fbecfd3f..95ec8170f2 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -199,16 +199,13 @@ bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data) { std::string panel_name = data.asString(); - LLPanelGroupTab* activating_tab = static_cast<LLPanelGroupTab*>(mSubTabContainer->getPanelByName(panel_name)); - - if(activating_tab == mCurrentTab - || activating_tab == mRequestedTab) + if(mRequestedTab != NULL)//we already have tab change request { - return true; + return false; } - mRequestedTab = activating_tab; - + mRequestedTab = static_cast<LLPanelGroupTab*>(mSubTabContainer->getPanelByName(panel_name)); + std::string mesg; if (mCurrentTab && mCurrentTab->needsApply(mesg)) { @@ -229,15 +226,9 @@ bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data) // we get a response back from the user. return false; } - else - { - // The current panel didn't have anything it needed to apply. - if (mRequestedTab) - { - transitionToTab(); - } - return true; - } + + transitionToTab(); + return true; } void LLPanelGroupRoles::transitionToTab() |