summaryrefslogtreecommitdiff
path: root/indra/llui/lltabcontainer.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-12-18 07:08:59 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-12-18 07:57:29 +0200
commitc87850ddab5604e57fdcebad6a53616232a1b648 (patch)
tree47da586a3b93b1cbd9af9db5f81f65bf066306cd /indra/llui/lltabcontainer.cpp
parentf5a7c22cea16b51db12360436ce64c2433a5aa5f (diff)
parenta592292242e29d0379ee72572a434359e1e892d1 (diff)
Merge branch 'main' into DRTVWR-591-maint-X
# Conflicts: # doc/contributions.txt # indra/newview/llpanelprofile.cpp # indra/newview/llspatialpartition.cpp
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 024444e1c9..be40a5bb4f 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -2148,14 +2148,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;
+ }
}
}
}