summaryrefslogtreecommitdiff
path: root/indra/llui/lltabcontainer.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-09-14 23:34:57 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-09-14 23:34:57 +0300
commit28e6ce451c3d01333a805f11286dacc9f3157c54 (patch)
treee9e4dd49e9a155e77d79977c4c9ad93677c35cdf /indra/llui/lltabcontainer.cpp
parentb09c19d27ceb2a3695cd688b1ccffcb3084f0e46 (diff)
SL-20269 Tab's focus jumps over item when clicking on edge items
Diffstat (limited to 'indra/llui/lltabcontainer.cpp')
-rw-r--r--indra/llui/lltabcontainer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index f15e9771c0..76b9e448a1 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -605,6 +605,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
LLButton* tab_button = getTab(index)->mButton;
gFocusMgr.setMouseCapture(this);
tab_button->setFocus(TRUE);
+ mMouseDownTimer.start();
}
}
if (handled) {
@@ -653,7 +654,11 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
handled = LLPanel::handleHover(x, y, mask);
}
- commitHoveredButton(x, y);
+ F32 drag_delay = 0.25f; // filter out clicks from dragging
+ if (mMouseDownTimer.getElapsedTimeF32() > drag_delay)
+ {
+ commitHoveredButton(x, y);
+ }
return handled;
}
@@ -699,6 +704,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
}
commitHoveredButton(x, y);
+ mMouseDownTimer.stop();
LLPanel* cur_panel = getCurrentPanel();
if (hasMouseCapture())
{