summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-19 10:42:26 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-19 10:42:26 +0300
commit05800a402b76f066fb889888723a44369d9fd7f8 (patch)
treefefbbb212b691c0cc53a3a57c35edf2110eab395 /indra/newview/llfloaterpreference.cpp
parent67d8dda08cfc2310614c2a984280e07c68cf41f6 (diff)
parented3d9abdd01304b5a9708880d9b150fb6568256b (diff)
Merge branch 'master' into DRTVWR-483
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 093753c967..951d11bbe5 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -725,7 +725,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
@@ -844,7 +844,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);
@@ -853,12 +854,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(""));
@@ -2633,20 +2637,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()
@@ -2704,7 +2705,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();
}
@@ -2725,11 +2726,6 @@ void LLPanelPreferenceGraphics::onPresetsListChange()
{
instance->saveSettings(); //make cancel work correctly after changing the preset
}
- else
- {
- std::string dummy;
- instance->saveGraphicsPreset(dummy);
- }
}
void LLPanelPreferenceGraphics::setPresetText()