MAINT-3634 FIXED After right-clicking another avatars nametag or avatar then pressing the "Alt" key, most options in the dropdown menu will no longer function.
parent
19560d1b75
commit
3686dc3e37
|
|
@ -53,6 +53,7 @@
|
|||
#include "llmorphview.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llmenugl.h"
|
||||
|
||||
// Globals
|
||||
BOOL gCameraBtnZoom = TRUE;
|
||||
|
|
@ -75,6 +76,7 @@ LLToolCamera::LLToolCamera()
|
|||
mOutsideSlopX(FALSE),
|
||||
mOutsideSlopY(FALSE),
|
||||
mValidClickPoint(FALSE),
|
||||
mValidSelection(FALSE),
|
||||
mMouseSteering(FALSE),
|
||||
mMouseUpX(0),
|
||||
mMouseUpY(0),
|
||||
|
|
@ -91,6 +93,8 @@ void LLToolCamera::handleSelect()
|
|||
if (gFloaterTools)
|
||||
{
|
||||
gFloaterTools->setStatusText("camera");
|
||||
// in case we start from tools floater, we count any selection as valid
|
||||
mValidSelection = gFloaterTools->getVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +102,14 @@ void LLToolCamera::handleSelect()
|
|||
void LLToolCamera::handleDeselect()
|
||||
{
|
||||
// gAgent.setLookingAtAvatar(FALSE);
|
||||
|
||||
// Make sure that temporary selection won't pass anywhere except pie tool.
|
||||
MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
|
||||
if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible())))
|
||||
{
|
||||
LLMenuGL::sMenuContainer->hideMenus();
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ protected:
|
|||
BOOL mOutsideSlopX;
|
||||
BOOL mOutsideSlopY;
|
||||
BOOL mValidClickPoint;
|
||||
BOOL mValidSelection;
|
||||
BOOL mMouseSteering;
|
||||
S32 mMouseUpX; // needed for releaseMouse()
|
||||
S32 mMouseUpY;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llworld.h"
|
||||
#include "llmenugl.h"
|
||||
|
||||
const S32 SLOP_DIST_SQ = 4;
|
||||
|
||||
|
|
@ -98,6 +99,8 @@ void LLToolGrab::handleSelect()
|
|||
{
|
||||
// viewer can crash during startup if we don't check.
|
||||
gFloaterTools->setStatusText("grab");
|
||||
// in case we start from tools floater, we count any selection as valid
|
||||
mValidSelection = gFloaterTools->getVisible();
|
||||
}
|
||||
gGrabBtnVertical = FALSE;
|
||||
gGrabBtnSpin = FALSE;
|
||||
|
|
@ -110,6 +113,14 @@ void LLToolGrab::handleDeselect()
|
|||
setMouseCapture( FALSE );
|
||||
}
|
||||
|
||||
// Make sure that temporary(invalid) selection won't pass anywhere except pie tool.
|
||||
MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
|
||||
if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible())))
|
||||
{
|
||||
LLMenuGL::sMenuContainer->hideMenus();
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ private:
|
|||
BOOL mHasMoved; // has mouse moved off center at all?
|
||||
BOOL mOutsideSlop; // has mouse moved outside center 5 pixels?
|
||||
BOOL mDeselectedThisClick;
|
||||
BOOL mValidSelection;
|
||||
|
||||
S32 mLastFace;
|
||||
LLVector2 mLastUVCoords;
|
||||
|
|
|
|||
|
|
@ -1311,7 +1311,16 @@ void LLToolPie::handleDeselect()
|
|||
}
|
||||
// remove temporary selection for pie menu
|
||||
LLSelectMgr::getInstance()->setHoverObject(NULL);
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
|
||||
// Menu may be still up during transfer to different tool.
|
||||
// toolfocus and toolgrab should retain menu, they will clear it if needed
|
||||
MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
|
||||
if (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0)
|
||||
{
|
||||
// in most cases menu is useless without correct selection, so either keep both or discard both
|
||||
gMenuHolder->hideMenus();
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
LLTool* LLToolPie::getOverrideTool(MASK mask)
|
||||
|
|
|
|||
Loading…
Reference in New Issue