summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rw-r--r--indra/llui/lluictrl.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 5b72f87a78..84b1c92097 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -795,16 +795,29 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out)
LLUICtrl* ctrl = this;
// search back through the control's parents for a panel
- // with a help_topic string defined
+ // or tab with a help_topic string defined
while (ctrl)
{
LLPanel *panel = dynamic_cast<LLPanel *>(ctrl);
- if (panel && !panel->getHelpTopic().empty())
+
+ if (panel)
{
- help_topic_out = panel->getHelpTopic();
- return true; // success
+ // does the panel have an active tab with a help topic?
+ LLPanel *tab = panel->childGetVisibleTabWithHelp();
+ if (tab)
+ {
+ help_topic_out = tab->getHelpTopic();
+ return true; // success (tab)
+ }
+
+ // otherwise, does the panel have a help topic itself?
+ if (!panel->getHelpTopic().empty())
+ {
+ help_topic_out = panel->getHelpTopic();
+ return true; // success (panel)
+ }
}
-
+
ctrl = ctrl->getParentUICtrl();
}