summaryrefslogtreecommitdiff
path: root/indra/llcommon/llkeybind.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-10-03 22:45:29 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-23 14:50:02 +0300
commite211372923bed31e632bc9825913d3d57cdc2d52 (patch)
tree104d4e314df3b0f329ea2be61f94fd631dda4174 /indra/llcommon/llkeybind.cpp
parent13a25be08f0c81a759076907d7950baf4f2c3ef2 (diff)
SL-6109 Remade 'ignore' list processing, renamed and reformed keybindings
Diffstat (limited to 'indra/llcommon/llkeybind.cpp')
-rw-r--r--indra/llcommon/llkeybind.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/llcommon/llkeybind.cpp b/indra/llcommon/llkeybind.cpp
index ff88a9c9aa..46a3230240 100644
--- a/indra/llcommon/llkeybind.cpp
+++ b/indra/llcommon/llkeybind.cpp
@@ -92,14 +92,11 @@ LLSD LLKeyData::asLLSD() const
LLSD data;
data["mouse"] = (LLSD::Integer)mMouse;
data["key"] = (LLSD::Integer)mKey;
+ data["mask"] = (LLSD::Integer)mMask;
if (mIgnoreMasks)
{
data["ignore_accelerators"] = (LLSD::Boolean)mIgnoreMasks;
}
- else
- {
- data["mask"] = (LLSD::Integer)mMask;
- }
return data;
}
@@ -147,7 +144,7 @@ bool LLKeyData::canHandle(const LLKeyData& data) const
{
if (data.mKey == mKey
&& data.mMouse == mMouse
- && (mIgnoreMasks || data.mMask == mMask))
+ && ((mIgnoreMasks && (data.mMask & mMask) == data.mMask) || data.mMask == mMask))
{
return true;
}
@@ -158,7 +155,7 @@ bool LLKeyData::canHandle(EMouseClickType mouse, KEY key, MASK mask) const
{
if (mouse == mMouse
&& key == mKey
- && (mIgnoreMasks || mask == mMask))
+ && ((mIgnoreMasks && (mask & mMask) == mask) || mask == mMask))
{
return true;
}