summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
authorMartin Reddy <lynx@lindenlab.com>2009-10-15 13:08:12 +0000
committerMartin Reddy <lynx@lindenlab.com>2009-10-15 13:08:12 +0000
commit925f01f6a066113049e8c829c6fc3875c69ef566 (patch)
tree4b28ca62ce3de11e3e9727ab09cdfe63466233cf /indra/llui/lluictrl.cpp
parent0051f6bc6d421b8f973d801189b9495c311a647b (diff)
DEV-41253: Updated the help context calculation code so that it will
now search through a panel's children to see if there are any visible tabs that have a help topic string defined. If so, we use this string. Updated all of the XUI files that include a tab_container to define help topic strings for their child panels. I named all of these strings with the floater name as the prefix and "tab" at the end. For example, "preferences_display_tab" or "people_nearby_tab".
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();
}