summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoolgrab.cpp5
-rw-r--r--indra/newview/lltoolgrab.h1
-rw-r--r--indra/newview/lltoolpie.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 429664e743..ba00d4c262 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -142,8 +142,9 @@ BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
// call the base class to propogate info to sim
LLTool::handleMouseDown(x, y, mask);
-
- if (!gAgent.leftButtonGrabbed())
+
+ // leftButtonGrabbed() checks if controls are reserved by scripts, but does not take masks into account
+ if (!gAgent.leftButtonGrabbed() || ((mask & DEFAULT_GRAB_MASK) != 0 && !gAgentCamera.cameraMouselook()))
{
// can grab transparent objects (how touch event propagates, scripters rely on this)
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h
index 02ed5c26d7..ce0de0f946 100644
--- a/indra/newview/lltoolgrab.h
+++ b/indra/newview/lltoolgrab.h
@@ -44,6 +44,7 @@ class LLPickInfo;
void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, const LLVector3 &grab_offset);
void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick);
+const MASK DEFAULT_GRAB_MASK = MASK_CONTROL;
/**
* LLToolGrabBase contains most of the semantics of LLToolGrab. It's just that
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index e7030a3f85..640f3ee3b8 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1390,7 +1390,7 @@ LLTool* LLToolPie::getOverrideTool(MASK mask)
{
if (gSavedSettings.getBOOL("EnableGrab"))
{
- if (mask == MASK_CONTROL)
+ if (mask == DEFAULT_GRAB_MASK)
{
return LLToolGrab::getInstance();
}