summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-06-29 18:21:11 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-06-29 18:21:11 -0700
commit97de9cd465bae1412e38df34a4ab014439948acc (patch)
tree09ba540ef9a767c3c9f40e0e289adbed310c2ba1 /indra/newview/lltoolpie.cpp
parent82882d77c41edc3fc3a962ab95ad19fc99604228 (diff)
parenta9471433eb7d0aa28c3a5b248ad34d3df4c096e7 (diff)
Merge branch 'DRTVWR-497' of bitbucket.org:lindenlab/viewer into DRTVWR-497
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 57cc13ab3f..32f466ee2b 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -203,14 +203,31 @@ BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
return LLTool::handleRightMouseUp(x, y, mask);
}
+BOOL LLToolPie::handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
+{
+ BOOL res = FALSE;
+ // mHoverPick should have updated on its own and we should have a face
+ // in LLViewerMediaFocus in case of media, so just reuse mHoverPick
+ if (mHoverPick.mUVCoords.mV[VX] >= 0.f && mHoverPick.mUVCoords.mV[VY] >= 0.f)
+ {
+ res = LLViewerMediaFocus::getInstance()->handleScrollWheel(mHoverPick.mUVCoords, clicks_x, clicks_y);
+ }
+ else
+ {
+ // this won't provide correct coordinates in case of object selection
+ res = LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks_x, clicks_y);
+ }
+ return res;
+}
+
BOOL LLToolPie::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- return LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks);
+ return handleScrollWheelAny(x, y, 0, clicks);
}
BOOL LLToolPie::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
- return LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks);
+ return handleScrollWheelAny(x, y, clicks, 0);
}
// True if you selected an object.