From a94a0a34c7eefc4540bd8200b8c13145ecbe2b4a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 17 Jun 2020 01:22:16 +0300 Subject: SL-13418 Restored original default value for DoubleClickTeleport --- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llkeyconflict.cpp | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7cdb41b3cb..b1606a0f3c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3550,7 +3550,7 @@ Value 0 - DoubleClickTeleport + DoubleClickTeleport Comment Enable double-click to teleport where allowed (afects minimap and people panel) @@ -3559,7 +3559,7 @@ Type Boolean Value - 1 + 0 DoubleClickShowWorldMap diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp index 4c055fcee6..8ee50d5c52 100644 --- a/indra/newview/llkeyconflict.cpp +++ b/indra/newview/llkeyconflict.cpp @@ -610,12 +610,6 @@ void LLKeyConflictHandler::saveToSettings(bool temporary) } } - if (!temporary) - { - // will remove any temporary file if there were any - clearUnsavedChanges(); - } - #if 1 // Legacy support // Remove #if-#endif section half a year after DRTVWR-501 releases. @@ -624,7 +618,7 @@ void LLKeyConflictHandler::saveToSettings(bool temporary) // more than one mode. // We are saving this even if we are in temporary mode - preferences // will restore values on cancel - if (mLoadMode == MODE_THIRD_PERSON) + if (mLoadMode == MODE_THIRD_PERSON && mHasUnsavedChanges) { bool value = canHandleMouse("walk_to", CLICK_DOUBLELEFT, MASK_NONE); gSavedSettings.setBOOL("DoubleClickAutoPilot", value); @@ -632,9 +626,6 @@ void LLKeyConflictHandler::saveToSettings(bool temporary) value = canHandleMouse("walk_to", CLICK_LEFT, MASK_NONE); gSavedSettings.setBOOL("ClickToWalk", value); - value = canHandleMouse("teleport_to", CLICK_DOUBLELEFT, MASK_NONE); - gSavedSettings.setBOOL("DoubleClickTeleport", value); - // new method can save both toggle and push-to-talk values simultaneously, // but legacy one can save only one. It also doesn't support mask. LLKeyData data = getControl("toggle_voice", 0); @@ -680,6 +671,22 @@ void LLKeyConflictHandler::saveToSettings(bool temporary) } } #endif + + if (mLoadMode == MODE_THIRD_PERSON && mHasUnsavedChanges) + { + // Map floater should react to doubleclick if doubleclick for teleport is set + // Todo: Seems conterintuitive for map floater to share inworld controls + // after these changes release, discuss with UI UX engineer if this should just + // be set to 1 by default (before release this also doubles as legacy support) + bool value = canHandleMouse("teleport_to", CLICK_DOUBLELEFT, MASK_NONE); + gSavedSettings.setBOOL("DoubleClickTeleport", value); + } + + if (!temporary) + { + // will remove any temporary file if there were any + clearUnsavedChanges(); + } } LLKeyData LLKeyConflictHandler::getDefaultControl(const std::string &control_name, U32 index) -- cgit v1.2.3