Skip to content
Snippets Groups Projects
Commit ce660c7e authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-11841 Fix PushToTalkToggle being set incorectly

Due to changed defaults, legacy compatibility will no longer work corectly, remove it
parent 28e07331
Branches
Tags
No related merge requests found
...@@ -4562,11 +4562,6 @@ void LLAppViewer::loadKeyBindings() ...@@ -4562,11 +4562,6 @@ void LLAppViewer::loadKeyBindings()
LLKeyboard::keyFromString(key_string, &key); LLKeyboard::keyFromString(key_string, &key);
} }
value = gSavedSettings.getBOOL("PushToTalkToggle");
std::string control_name = value ? "toggle_voice" : "voice_follow_key";
third_person_view.registerControl(control_name, 0, mouse, key, MASK_NONE, true);
sitting_view.registerControl(control_name, 0, mouse, key, MASK_NONE, true);
if (third_person_view.hasUnsavedChanges()) if (third_person_view.hasUnsavedChanges())
{ {
// calls loadBindingsXML() // calls loadBindingsXML()
...@@ -4578,25 +4573,6 @@ void LLAppViewer::loadKeyBindings() ...@@ -4578,25 +4573,6 @@ void LLAppViewer::loadKeyBindings()
// calls loadBindingsXML() // calls loadBindingsXML()
sitting_view.saveToSettings(); sitting_view.saveToSettings();
} }
// in case of voice we need to repeat this in other modes
for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i)
{
// edit and first person modes; MODE_SAVED_SETTINGS not in use at the moment
if (i != LLKeyConflictHandler::MODE_THIRD_PERSON && i != LLKeyConflictHandler::MODE_SITTING)
{
LLKeyConflictHandler handler((LLKeyConflictHandler::ESourceMode)i);
handler.registerControl(control_name, 0, mouse, key, MASK_NONE, true);
if (handler.hasUnsavedChanges())
{
// calls loadBindingsXML()
handler.saveToSettings();
}
}
}
} }
// since something might have gone wrong or there might have been nothing to save // since something might have gone wrong or there might have been nothing to save
// (and because otherwise following code will have to be encased in else{}), // (and because otherwise following code will have to be encased in else{}),
......
...@@ -644,7 +644,6 @@ void LLKeyConflictHandler::saveToSettings(bool temporary) ...@@ -644,7 +644,6 @@ void LLKeyConflictHandler::saveToSettings(bool temporary)
data = getControl("voice_follow_key", 0); data = getControl("voice_follow_key", 0);
} }
gSavedSettings.setBOOL("PushToTalkToggle", can_toggle);
if (data.isEmpty()) if (data.isEmpty())
{ {
// legacy viewer has a bug that might crash it if NONE value is assigned. // legacy viewer has a bug that might crash it if NONE value is assigned.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment