summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolfocus.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-10-09 16:10:00 -0700
committerdolphin <dolphin@lindenlab.com>2014-10-09 16:10:00 -0700
commitf9113c286fae143962f1d79663e66a303c46ce51 (patch)
tree9190363e14749efdb3f46de02c67c377a0b9718e /indra/newview/lltoolfocus.cpp
parent873a72fdbad8bca29cf8129b318719c1af5f8e9d (diff)
parent788ce7a8cdbbbf98566ce75ec281ec00c21dc6d8 (diff)
Merge
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)