summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 9305f38a29..ffd83a8555 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2669,6 +2669,7 @@ LLPanelPreferenceControls::LLPanelPreferenceControls()
mEditingColumn(-1),
mEditingMode(0)
{
+ // MODE_COUNT - 1 because there are currently no settings assigned to 'saved settings'.
for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i)
{
mConflictHandler[i].setLoadMode((LLKeyConflictHandler::ESourceMode)i);
@@ -2908,17 +2909,25 @@ void LLPanelPreferenceControls::onListCommit()
void LLPanelPreferenceControls::onModeCommit()
{
- regenerateControls();
+ mEditingMode = pKeyModeBox->getValue().asInteger();
+ if (mConflictHandler[mEditingMode].empty())
+ {
+ // opening for first time
+ mConflictHandler[mEditingMode].loadFromSettings((LLKeyConflictHandler::ESourceMode)mEditingMode);
+ }
+ populateControlTable();
}
void LLPanelPreferenceControls::onRestoreDefaults()
{
for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i)
{
- mConflictHandler[mEditingMode].resetToDefaults();
+ mConflictHandler[i].resetToDefaults();
// Apply changes to viewer as 'temporary'
- mConflictHandler[mEditingMode].saveToSettings(true);
+ mConflictHandler[i].saveToSettings(true);
}
+
+ updateTable();
}
// todo: copy onSetKeyBind to interface and inherit from interface