summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-12-03 17:10:50 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-12-03 17:10:50 +0200
commit4de5f6a8533174696211fab8952adc7001357ba4 (patch)
treef8ae3b71c19eb8ae493756ed56f9ab14cc872951
parent99daebb1de59767c87fdfb063e01d0128d164e9c (diff)
SL-14455 FIXED Drag ground to turn is still active when Single click on land is set to No action
-rw-r--r--indra/newview/lltoolpie.cpp5
-rw-r--r--indra/newview/llviewerinput.cpp11
-rw-r--r--indra/newview/llviewerinput.h2
3 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 85d79bb045..322d0bc727 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -63,6 +63,7 @@
#include "llviewerobject.h"
#include "llviewerparcelmgr.h"
#include "llviewerwindow.h"
+#include "llviewerinput.h"
#include "llviewermedia.h"
#include "llvoavatarself.h"
#include "llviewermediafocus.h"
@@ -743,7 +744,9 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
}
else if (!mMouseOutsideSlop
- && mMouseButtonDown)
+ && mMouseButtonDown
+ // disable camera steering if click on land is not used for moving
+ && gViewerInput.isMouseBindUsed(CLICK_LEFT))
{
S32 delta_x = x - mMouseDownX;
S32 delta_y = y - mMouseDownY;
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index 3954d4fb5e..c0eaa88f54 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -1527,3 +1527,14 @@ void LLViewerInput::scanMouse()
}
}
}
+
+bool LLViewerInput::isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode)
+{
+ S32 size = mMouseBindings[mode].size();
+ for (S32 index = 0; index < size; index++)
+ {
+ if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
+ return true;
+ }
+ return false;
+}
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 1fe55bd585..281a209896 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -124,6 +124,8 @@ public:
BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down);
void scanMouse();
+ bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask = MASK_NONE, const S32 mode = MODE_THIRD_PERSON);
+
private:
bool scanKey(const std::vector<LLKeyboardBinding> &binding,
S32 binding_count,