summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-11-07 18:21:16 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-11-07 18:21:16 +0200
commit88956491c819525fa07c1d347056f6a6900b4881 (patch)
tree5c758e4578aaf06d25571a1ea6eed3df4bc6e8ba /indra
parent7539c8bbde67c5dc438cf93689cc7940b83c2de4 (diff)
SL-9414 Inconsistent hover vs click action when viewed through transparent prims
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltoolpie.cpp18
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;