diff options
author | James Cook <james@lindenlab.com> | 2010-01-11 14:06:09 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-01-11 14:06:09 -0800 |
commit | a36087f5c1851b0bd5eec5788609f35b8a524384 (patch) | |
tree | d7057930083ba9499fc8b3783a531b24ac9ea7f1 /indra/llui/llpanel.cpp | |
parent | a570c39bd3ca9ca567ef6a778305b8231535eb70 (diff) | |
parent | 370a8592ac4c3b6eb6fd9f6ddd35960b763e634f (diff) |
Merge, sync from viewer-2-0, fixed conflict in llinspectavatar.cpp
Diffstat (limited to 'indra/llui/llpanel.cpp')
-rw-r--r-- | indra/llui/llpanel.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index db32882438..143f19eea6 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -43,6 +43,7 @@ #include "llerror.h" #include "lltimer.h" +#include "llaccordionctrltab.h" #include "llbutton.h" #include "llmenugl.h" //#include "llstatusbar.h" @@ -851,14 +852,26 @@ static LLPanel *childGetVisibleTabWithHelp(LLView *parent) // look through immediate children first for an active tab with help for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child)) { + LLPanel *curTabPanel = NULL; + + // do we have a tab container? LLTabContainer *tab = dynamic_cast<LLTabContainer *>(child); if (tab && tab->getVisible()) { - LLPanel *curTabPanel = tab->getCurrentPanel(); - if (curTabPanel && !curTabPanel->getHelpTopic().empty()) - { - return curTabPanel; - } + curTabPanel = tab->getCurrentPanel(); + } + + // do we have an accordion tab? + LLAccordionCtrlTab* accordion = dynamic_cast<LLAccordionCtrlTab *>(child); + if (accordion && accordion->getDisplayChildren()) + { + curTabPanel = dynamic_cast<LLPanel *>(accordion->getAccordionView()); + } + + // if we found a valid tab, does it have a help topic? + if (curTabPanel && !curTabPanel->getHelpTopic().empty()) + { + return curTabPanel; } } |