summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
committerGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
commit369cefd5b3f2f52ae0dd203fcd45a4618f74b0f3 (patch)
tree941d27a32099abaf71bae8a2865002e2b25a3512 /indra/newview/lltoolpie.cpp
parent0494a502aafac73800352dc26c4eb3a27b02a8ce (diff)
parent18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff)
pull from viewer-release
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rwxr-xr-xindra/newview/lltoolpie.cpp44
1 files changed, 37 insertions, 7 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index abb9a63238..e17651dc91 100755
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -86,7 +86,8 @@ LLToolPie::LLToolPie()
mBlockClickToWalk(false),
mClickAction(0),
mClickActionBuyEnabled( gSavedSettings.getBOOL("ClickActionBuyEnabled") ),
- mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") )
+ mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") ),
+ mDoubleClickTimer()
{
}
@@ -102,7 +103,12 @@ BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktyp
BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
{
- mMouseOutsideSlop = FALSE;
+ if (mDoubleClickTimer.getStarted())
+ {
+ mDoubleClickTimer.stop();
+ }
+
+ mMouseOutsideSlop = FALSE;
mMouseDownX = x;
mMouseDownY = y;
@@ -644,7 +650,15 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
{
- LLViewerObject* obj = mPick.getObject();
+ if (!mDoubleClickTimer.getStarted())
+ {
+ mDoubleClickTimer.start();
+ }
+ else
+ {
+ mDoubleClickTimer.reset();
+ }
+ LLViewerObject* obj = mPick.getObject();
U8 click_action = final_click_action(obj);
// let media have first pass at click
@@ -738,10 +752,17 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL;
}
- if (handleMediaDblClick(mPick))
- {
- return TRUE;
- }
+ if (handleMediaDblClick(mPick))
+ {
+ return TRUE;
+ }
+
+ if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f))
+ {
+ mDoubleClickTimer.stop();
+ return FALSE;
+ }
+ mDoubleClickTimer.stop();
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
{
@@ -754,6 +775,15 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
FALSE /* ignore transparent */,
FALSE /* ignore particles */);
+ if(mPick.mPickType == LLPickInfo::PICK_OBJECT)
+ {
+ if (mPick.getObject() && mPick.getObject()->isHUDAttachment())
+ {
+ mPick = savedPick;
+ return FALSE;
+ }
+ }
+
if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
(mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
{