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.cpp27
1 files changed, 17 insertions, 10 deletions
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)