summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolfocus.cpp
diff options
context:
space:
mode:
authorGraham Linden <none@none>2014-09-25 09:20:01 -0700
committerGraham Linden <none@none>2014-09-25 09:20:01 -0700
commit9f4788d7a8a924de654d55bfb102a81f797a9cf9 (patch)
tree742fb8127dc84052265647ed110e8a6446253103 /indra/newview/lltoolfocus.cpp
parent6004ad167458914c3b85438b96e81ea8796e368b (diff)
parent499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff)
Merge viewer-release 3.7.17
Diffstat (limited to 'indra/newview/lltoolfocus.cpp')
-rwxr-xr-xindra/newview/lltoolfocus.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index ee4ec112f8..58073d1186 100755
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -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)