summaryrefslogtreecommitdiff
path: root/indra/llui/lltabcontainer.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-12-18 06:33:57 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-12-18 06:33:57 +0200
commitaed6313d7c755ae1b980074fc27dfd98267fca24 (patch)
treebce1767cdba0a920eac80bc2c78c71bbc9899e15 /indra/llui/lltabcontainer.cpp
parenta069a21d318abd4eded46556c3252fec08eea84c (diff)
parenta592292242e29d0379ee72572a434359e1e892d1 (diff)
Merge branch 'main' into DRTVWR-594-maint-Y
Diffstat (limited to 'indra/llui/lltabcontainer.cpp')
-rw-r--r--indra/llui/lltabcontainer.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 76b9e448a1..cb36f72f6e 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -2149,14 +2149,19 @@ void LLTabContainer::commitHoveredButton(S32 x, S32 y)
{
if (!getTabsHidden() && hasMouseCapture())
{
- for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
+ for (tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
- LLTabTuple* tuple = *iter;
- S32 local_x = x - tuple->mButton->getRect().mLeft;
- S32 local_y = y - tuple->mButton->getRect().mBottom;
- if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible())
+ LLButton* button = (*iter)->mButton;
+ LLPanel* panel = (*iter)->mTabPanel;
+ if (button->getEnabled() && button->getVisible() && !panel->getVisible())
{
- tuple->mButton->onCommit();
+ S32 local_x = x - button->getRect().mLeft;
+ S32 local_y = y - button->getRect().mBottom;
+ if (button->pointInView(local_x, local_y))
+ {
+ button->onCommit();
+ break;
+ }
}
}
}