From 09108591cd61bd84d3b5b661573e8df49cdbedb8 Mon Sep 17 00:00:00 2001
From: Richard Nelson <richard@lindenlab.com>
Date: Wed, 14 Oct 2009 01:17:21 +0000
Subject: [PATCH] better heuristics for ShowXuiNames tooltips

reviewed by Brad
---
 indra/newview/llviewerwindow.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 874d76308aa..3cc379821aa 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2605,12 +2605,17 @@ void LLViewerWindow::updateUI()
 				{
 					it.skipDescendants();
 				}
-				// only report xui names for LLUICtrls, not the various container LLViews
-				else if (dynamic_cast<LLUICtrl*>(viewp)) 
+				// only report xui names for LLUICtrls, 
+				// and blacklist the various containers we don't care about
+				else if (dynamic_cast<LLUICtrl*>(viewp) 
+						&& viewp != gMenuHolder
+						&& viewp != gFloaterView
+						&& viewp != gNotifyBoxView
+						&& viewp != gConsole) 
 				{
-					if (dynamic_cast<LLPanel*>(viewp))
+					if (dynamic_cast<LLFloater*>(viewp))
 					{
-						// constrain search to descendants of this panel
+						// constrain search to descendants of this (frontmost) floater
 						// by resetting iterator
 						it = viewp->beginTreeDFS();
 					}
-- 
GitLab