summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-18 23:41:19 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-18 23:41:19 +0300
commit510574dc1416b02d6f045feda2555f87e99d1c0c (patch)
treeafa1acea9b30cafaa368779e10d94a3ff335232f /indra/newview/llfloaterpreference.cpp
parentebc629ffc45e7d1cf66e3f98ee4ca90dea18af33 (diff)
parented3d9abdd01304b5a9708880d9b150fb6568256b (diff)
Merge branch 'master' into DRTVWR-501-maint
# Conflicts: # indra/llxml/llcontrolgroupreader.h # indra/newview/llviewerkeyboard.cpp
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index a1dc7d9f9e..f7e984c14f 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -603,7 +603,7 @@ void LLFloaterPreference::cancel()
// hide spellchecker settings folder
LLFloaterReg::hideInstance("prefs_spellchecker");
- // hide advancede floater
+ // hide advanced graphics floater
LLFloaterReg::hideInstance("prefs_graphics_advanced");
// reverts any changes to current skin
@@ -713,7 +713,8 @@ void LLFloaterPreference::onOpen(const LLSD& key)
saveSettings();
// Make sure there is a default preference file
- LLPresetsManager::getInstance()->createMissingDefault();
+ LLPresetsManager::getInstance()->createMissingDefault(PRESETS_CAMERA);
+ LLPresetsManager::getInstance()->createMissingDefault(PRESETS_GRAPHIC);
bool started = (LLStartUp::getStartupState() == STATE_STARTED);
@@ -722,12 +723,15 @@ void LLFloaterPreference::onOpen(const LLSD& key)
LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton");
LLButton* exceptions_btn = findChild<LLButton>("RenderExceptionsButton");
- load_btn->setEnabled(started);
- save_btn->setEnabled(started);
- delete_btn->setEnabled(started);
- exceptions_btn->setEnabled(started);
+ if (load_btn && save_btn && delete_btn && exceptions_btn)
+ {
+ load_btn->setEnabled(started);
+ save_btn->setEnabled(started);
+ delete_btn->setEnabled(started);
+ exceptions_btn->setEnabled(started);
+ }
- collectSearchableItems();
+ collectSearchableItems();
if (!mFilterEdit->getText().empty())
{
mFilterEdit->setText(LLStringExplicit(""));
@@ -2380,20 +2384,17 @@ void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
void LLPanelPreference::deletePreset(const LLSD& user_data)
{
- std::string subdirectory = user_data.asString();
- LLFloaterReg::showInstance("delete_pref_preset", subdirectory);
+ LLFloaterReg::showInstance("delete_pref_preset", user_data.asString());
}
void LLPanelPreference::savePreset(const LLSD& user_data)
{
- std::string subdirectory = user_data.asString();
- LLFloaterReg::showInstance("save_pref_preset", subdirectory);
+ LLFloaterReg::showInstance("save_pref_preset", user_data.asString());
}
void LLPanelPreference::loadPreset(const LLSD& user_data)
{
- std::string subdirectory = user_data.asString();
- LLFloaterReg::showInstance("load_pref_preset", subdirectory);
+ LLFloaterReg::showInstance("load_pref_preset", user_data.asString());
}
void LLPanelPreference::setHardwareDefaults()
@@ -2451,7 +2452,7 @@ BOOL LLPanelPreferenceGraphics::postBuild()
LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
presetsMgr->setPresetListChangeCallback(boost::bind(&LLPanelPreferenceGraphics::onPresetsListChange, this));
- presetsMgr->createMissingDefault(); // a no-op after the first time, but that's ok
+ presetsMgr->createMissingDefault(PRESETS_GRAPHIC); // a no-op after the first time, but that's ok
return LLPanelPreference::postBuild();
}
@@ -2472,11 +2473,6 @@ void LLPanelPreferenceGraphics::onPresetsListChange()
{
instance->saveSettings(); //make cancel work correctly after changing the preset
}
- else
- {
- std::string dummy;
- instance->saveGraphicsPreset(dummy);
- }
}
void LLPanelPreferenceGraphics::setPresetText()