summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llappviewer.cpp4
-rw-r--r--indra/newview/llfloaterpreference.cpp9
-rw-r--r--indra/newview/llfloaterpreference.h9
-rw-r--r--indra/newview/llkeyconflict.cpp1
4 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 775b6db94b..f81f9557ff 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1014,8 +1014,8 @@ bool LLAppViewer::init()
// Also part of backward compatibility is present in LLKeyConflictHandler to modify
// legacy variables on changes in new system (to make sure we won't enforce
// legacy values again if user dropped to defaults in new system)
- if (mIsFirstRun
- && !gDirUtilp->fileExists(key_bindings_file)) // if file is missing, assume that there were no changes by user yet
+ if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion
+ || !gDirUtilp->fileExists(key_bindings_file)) // if file is missing, assume that there were no changes by user yet
{
// copy mouse actions and voice key changes to new file
LL_INFOS("InitInfo") << "Converting legacy mouse bindings to new format" << LL_ENDL;
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ed28756473..a1d3c65289 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2083,7 +2083,7 @@ void LLFloaterPreference::updateClickActionControls()
MASK_NONE,
double_clk_action == 2);
- panel->updateTable();
+ panel->updateAndApply();
}
}
}
@@ -3152,6 +3152,13 @@ void LLPanelPreferenceControls::setKeyBind(const std::string &control, EMouseCli
}
}
+void LLPanelPreferenceControls::updateAndApply()
+{
+ S32 mode = LLKeyConflictHandler::MODE_THIRD_PERSON;
+ mConflictHandler[mode].saveToSettings(true);
+ updateTable();
+}
+
// from LLSetKeybindDialog's interface
bool LLPanelPreferenceControls::onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes)
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 066deb97ee..1268935712 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -317,15 +317,13 @@ public:
bool canKeyBindHandle(const std::string &control, EMouseClickType click, KEY key, MASK mask);
// Bypasses to let Move & view modify values without need to create own key binding handler
void setKeyBind(const std::string &control, EMouseClickType click, KEY key, MASK mask, bool set /*set or reset*/ );
+ void updateAndApply();
// from interface
/*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes);
/*virtual*/ void onDefaultKeyBind(bool all_modes);
/*virtual*/ void onCancelKeyBind();
- // Updates keybindings from storage to table
- void updateTable();
-
private:
// reloads settings, discards current changes, updates table
void regenerateControls();
@@ -336,7 +334,10 @@ private:
void addControlTableSeparator();
// Cleans content and then adds content from xml files according to current mEditingMode
- void populateControlTable();
+ void populateControlTable();
+
+ // Updates keybindings from storage to table
+ void updateTable();
LLScrollListCtrl* pControlsTable;
LLComboBox *pKeyModeBox;
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index b426dc14fc..4c055fcee6 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -230,6 +230,7 @@ bool LLKeyConflictHandler::clearControl(const std::string &control_name, U32 dat
return false;
}
type_data.mKeyBind.resetKeyData(data_index);
+ mHasUnsavedChanges = true;
return true;
}