diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-11-05 10:52:23 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-11-05 10:52:23 -0500 |
commit | 13b4909a3ca066105695afc174642409daa46df2 (patch) | |
tree | f12b1c2d32fda122bcd1f6f79ebfe2226325d9a8 /indra/newview/lltoolfocus.cpp | |
parent | 52ed6ac28697ffcfd7300602aec34db8eafc171a (diff) | |
parent | 02e2235277a90f2e291557a429ae4e5de3e0d3b6 (diff) |
merge
Diffstat (limited to 'indra/newview/lltoolfocus.cpp')
-rwxr-xr-x | indra/newview/lltoolfocus.cpp | 12 |
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) |