summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolgrab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolgrab.cpp')
-rwxr-xr-xindra/newview/lltoolgrab.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 9ac84e0066..fa6694b93b 100755
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -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)