MAINT-957 Double-click Auto-pilot activates for clicks on UI elements, HUDs, some right-clicks
parent
40699b9663
commit
8a761993da
|
|
@ -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,6 +752,13 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f))
|
||||
{
|
||||
mDoubleClickTimer.stop();
|
||||
return FALSE;
|
||||
}
|
||||
mDoubleClickTimer.stop();
|
||||
|
||||
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
|
||||
{
|
||||
// We may be doing double click to walk, but we don't want to use a target on
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ private:
|
|||
LLSafeHandle<LLObjectSelection> mLeftClickSelection;
|
||||
BOOL mClickActionBuyEnabled;
|
||||
BOOL mClickActionPayEnabled;
|
||||
LLFrameTimer mDoubleClickTimer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue