From 88956491c819525fa07c1d347056f6a6900b4881 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 7 Nov 2018 18:21:16 +0200 Subject: SL-9414 Inconsistent hover vs click action when viewed through transparent prims --- indra/newview/lltoolpie.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') 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; -- cgit v1.2.3 From e867e619dbb62b4c9ebc1d358c6fea048f87190c Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 15 Nov 2018 00:27:26 +0200 Subject: build fix --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5cfb2026e0..1b76d249cb 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -111,7 +111,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseOutsideSlop = FALSE; mMouseDownX = x; mMouseDownY = y; - LLTimer pick_timer;. + LLTimer pick_timer; BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); mPick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged); LLViewerObject *object = mPick.getObject(); -- cgit v1.2.3 From ca9d39c6c7f0acd2cf6f8a6e894d09dcf8e6a353 Mon Sep 17 00:00:00 2001 From: Cinder Date: Thu, 25 Aug 2016 13:42:37 -0500 Subject: SL-3404 Don't send ParcelPropertiesRequest on every cursor position change --- indra/newview/lltoolpie.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 1b76d249cb..697db01d11 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -870,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. -- cgit v1.2.3