summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-03-01 10:12:00 -0800
committerBrad Linden <brad@lindenlab.com>2024-03-01 10:12:00 -0800
commit258c039584dd293ba7218dc522882bc0bac25e63 (patch)
treea695d32a5fff74828d281f04186039e08287566a /indra/llui/lluictrl.cpp
parent23d44cb6653ee4ca46ec0e33f19b393b58f5332f (diff)
parent701d1a33bb8227aa55a71f48caeb30a453e77ee0 (diff)
Merge remote-tracking branch 'origin/main' into release/gltf-maint2
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rw-r--r--indra/llui/lluictrl.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 21afcae7c3..7eb9ae69fb 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -768,25 +768,20 @@ void LLUICtrl::setIsChrome(BOOL is_chrome)
// virtual
BOOL LLUICtrl::getIsChrome() const
-{
+{
+ if (mIsChrome)
+ return TRUE;
+
LLView* parent_ctrl = getParent();
- while(parent_ctrl)
+ while (parent_ctrl)
{
- if(parent_ctrl->isCtrl())
- {
- break;
- }
+ if (parent_ctrl->isCtrl())
+ return ((LLUICtrl*)parent_ctrl)->getIsChrome();
+
parent_ctrl = parent_ctrl->getParent();
}
-
- if(parent_ctrl)
- {
- return mIsChrome || ((LLUICtrl*)parent_ctrl)->getIsChrome();
- }
- else
- {
- return mIsChrome ;
- }
+
+ return FALSE;
}