summaryrefslogtreecommitdiff
path: root/indra/newview/lltool.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-25 20:09:42 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-25 20:09:42 +0300
commitd4373437f2bb80579b0a2c984d30d041e0c6d156 (patch)
tree206bf0c87dc042bbbe7b6b6b83610041e49b5740 /indra/newview/lltool.cpp
parent29dd0298af63c47a4c40eccb90011fd5ed48295b (diff)
parent6b1f96187d7a93a4bbaecf1a84162a141eed5971 (diff)
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/newview/lltool.cpp')
-rw-r--r--indra/newview/lltool.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index 4aad650b68..5e703933ca 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -38,6 +38,7 @@
#include "lltoolfocus.h"
#include "llfocusmgr.h"
#include "llagent.h"
+#include "llagentcamera.h"
#include "llviewerjoystick.h"
extern BOOL gDebugClicks;
@@ -84,7 +85,14 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
}
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL;
- gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
+ if (gAgentCamera.cameraMouselook())
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
+ }
+ else
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
+ }
return TRUE;
}
@@ -95,8 +103,15 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
LL_INFOS() << "LLTool left mouse up" << LL_ENDL;
}
// by default, didn't handle it
- // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
- gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
+ // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
+ if (gAgentCamera.cameraMouselook())
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
+ }
+ else
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
+ }
return TRUE;
}