summaryrefslogtreecommitdiff
path: root/indra/newview/llkeyconflict.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llkeyconflict.cpp')
-rw-r--r--indra/newview/llkeyconflict.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index 5f966624ca..b426dc14fc 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -217,6 +217,22 @@ bool LLKeyConflictHandler::registerControl(const std::string &control_name, U32
return false;
}
+bool LLKeyConflictHandler::clearControl(const std::string &control_name, U32 data_index)
+{
+ if (control_name.empty())
+ {
+ return false;
+ }
+ LLKeyConflict &type_data = mControlsMap[control_name];
+ if (!type_data.mAssignable)
+ {
+ // Example: user tried to assign camera spin to all modes, but first person mode doesn't support it
+ return false;
+ }
+ type_data.mKeyBind.resetKeyData(data_index);
+ return true;
+}
+
LLKeyData LLKeyConflictHandler::getControl(const std::string &control_name, U32 index)
{
if (control_name.empty())