diff options
author | Lynx Linden <lynx@lindenlab.com> | 2010-01-11 10:41:01 +0000 |
---|---|---|
committer | Lynx Linden <lynx@lindenlab.com> | 2010-01-11 10:41:01 +0000 |
commit | d24cd96ef83263a0fe1f5853d6e5cd67f59ed16a (patch) | |
tree | f15f0314bc07d0a85373031acfc08b51fb844d94 /indra | |
parent | a4baeed12f241f29c3f2e856b386eecf4ab46db6 (diff) |
EXT-3929: Also look in accordion tabs for help topic.
When the user clicks on the help "?" button, we try to find the
currently active tab and see if there is a help topic for that tab.
In addition, we now also look for a currently-visible accordion tab.
Diffstat (limited to 'indra')
-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; } } |