summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:41:11 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:41:11 +0300
commit93f0023efad59c6f86ee8003e3a22f1102ad28e8 (patch)
treeffb06811136a43a737aacfa844974e206f9f5537 /indra/newview/lltoolpie.cpp
parent922793e4898ec272576f32b79cc31b1c299e1e21 (diff)
parent34322f8f37380df868703051230f2a4109602b3f (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 9e37ca0394..697db01d11 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -111,11 +111,24 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
mMouseOutsideSlop = FALSE;
mMouseDownX = x;
mMouseDownY = y;
- LLTimer pick_timer;
- BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
- //left mouse down always picks transparent (but see handleMouseUp)
- mPick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged);
- LL_INFOS() << "pick_rigged is " << (S32) pick_rigged << " pick time elapsed " << pick_timer.getElapsedTimeF32() << LL_ENDL;
+ LLTimer pick_timer;
+ BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
+ mPick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged);
+ 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*/, pick_rigged);
+ }
+ LL_INFOS() << "pick_rigged is " << (S32) pick_rigged << " pick time elapsed " << pick_timer.getElapsedTimeF32() << LL_ENDL;
+
mPick.mKeyMask = mask;
mMouseButtonDown = true;
@@ -857,13 +870,11 @@ static bool needs_tooltip(LLSelectNode* nodep)
BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg)
{
- LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal );
- //
- // Do not show hover for land unless prefs are set to allow it.
- //
-
+ // Do not show hover for land unless prefs are set to allow it.
if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return TRUE;
-
+
+ LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal );
+
// Didn't hit an object, but since we have a land point we
// must be hovering over land.