summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-10-13 22:43:22 +0000
committerRichard Nelson <richard@lindenlab.com>2009-10-13 22:43:22 +0000
commit9fcbdab559b7cae31ffe597b3aa5293c4b7c9a35 (patch)
tree675ee990e48c7dadfc932bd1e5381e0f5865a174
parent1dfb1a1eb7bdc05b4b1110f3b9d9557704b32b0e (diff)
better ShowXuiNames tooltip heuristics
reviewed by James
-rw-r--r--indra/newview/llviewerwindow.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index fc6467ea23..874d76308a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2605,8 +2605,19 @@ void LLViewerWindow::updateUI()
{
it.skipDescendants();
}
- else if (viewp->getMouseOpaque())
+ // only report xui names for LLUICtrls, not the various container LLViews
+ else if (dynamic_cast<LLUICtrl*>(viewp))
{
+ if (dynamic_cast<LLPanel*>(viewp))
+ {
+ // constrain search to descendants of this panel
+ // by resetting iterator
+ it = viewp->beginTreeDFS();
+ }
+
+ // if we are in a new part of the tree (not a descendent of current tooltip_view)
+ // then push the results for tooltip_view and start with a new potential view
+ // NOTE: this emulates visiting only the leaf nodes that meet our criteria
if (!viewp->hasAncestor(tooltip_view))
{
append_xui_tooltip(tooltip_view, tool_tip_msg);