summaryrefslogtreecommitdiff
path: root/indra/llui/llaccordionctrl.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-04-26 17:23:31 +0300
committerMike Antipov <mantipov@productengine.com>2010-04-26 17:23:31 +0300
commit4a975bd1c205e32914d8b9005519052a6d72a322 (patch)
tree29c6a1b2605dc229bc9d78474180549d7c1598ed /indra/llui/llaccordionctrl.cpp
parenta0467365140c504eb0f5ad053ac22a2698a2abd7 (diff)
parenta00712e95133001b29fb15b15ccb6e66f2ec075b (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/llui/llaccordionctrl.cpp')
-rw-r--r--indra/llui/llaccordionctrl.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 136fd2a9ac..dca43c5784 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -668,15 +668,23 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
if(accordion_tab->hasFocus() && i>0)
{
+ bool prev_visible_tab_found = false;
while(i>0)
{
if(mAccordionTabs[--i]->getVisible())
+ {
+ prev_visible_tab_found = true;
break;
+ }
}
-
- accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- accordion_tab->notify(LLSD().with("action","select_last"));
- return 1;
+
+ if (prev_visible_tab_found)
+ {
+ accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+ accordion_tab->notify(LLSD().with("action","select_last"));
+ return 1;
+ }
+ break;
}
}
return 0;