diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-07 18:21:16 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-07 18:21:16 +0200 |
commit | 88956491c819525fa07c1d347056f6a6900b4881 (patch) | |
tree | 5c758e4578aaf06d25571a1ea6eed3df4bc6e8ba /indra | |
parent | 7539c8bbde67c5dc438cf93689cc7940b83c2de4 (diff) |
SL-9414 Inconsistent hover vs click action when viewed through transparent prims
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltoolpie.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5082e16685..d8f63b9332 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -112,8 +112,22 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseDownX = x; mMouseDownY = y; - //left mouse down always picks transparent (but see handleMouseUp) - mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + + mPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); + LLViewerObject *object = mPick.getObject(); + LLViewerObject *parent = object ? object->getRootEdit() : NULL; + if (!object + || object->isAttachment() + || object->getClickAction() == CLICK_ACTION_DISABLED + || (!useClickAction(mask, object, parent) && !object->flagHandleTouch() && !(parent && parent->flagHandleTouch()))) + { + // Unless we are hovering over actionable visible object + // left mouse down always picks transparent (but see handleMouseUp). + // Also see LLToolPie::handleHover() - priorities are a bit different there. + // Todo: we need a more consistent set of rules to work with + mPick = gViewerWindow->pickImmediate(x, y, TRUE /*transparent*/, FALSE); + } + mPick.mKeyMask = mask; mMouseButtonDown = true; |