summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-03-10 15:36:58 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-03-10 15:36:58 -0700
commitd67a3022d3a9432f279768371b27ea5322315905 (patch)
tree0254d8a7889ff6639cf6bf9b40f63499df37ceb4 /indra/llui/lluictrl.cpp
parentfc462b2b0f7ee153626d162bd97a05110f0804b7 (diff)
parentb242d696ba03f66494dfca1f05a74ed1b15cd6e4 (diff)
Merge branch 'main' of github.com:secondlife/viewer-private into roxie/webrtc-voice
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;
}