summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterperformance.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-01-10 22:53:32 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-01-10 22:55:47 +0200
commit020bfa66ba9f1fee3e403595a1d6c95332bb16f7 (patch)
treee9ff26364c169491ab346f3909f66051bd765eeb /indra/newview/llfloaterperformance.cpp
parent495e34b84fa34ae5394f33f6f1175e959c56e769 (diff)
SL-18923 Add Reset to default settings button
Diffstat (limited to 'indra/newview/llfloaterperformance.cpp')
-rw-r--r--indra/newview/llfloaterperformance.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 36912971d9..88319b170f 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -127,6 +127,7 @@ BOOL LLFloaterPerformance::postBuild()
mObjectList->setIconClickedCallback(boost::bind(&LLFloaterPerformance::detachItem, this, _1));
mSettingsPanel->getChild<LLButton>("advanced_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickAdvanced, this));
+ mSettingsPanel->getChild<LLButton>("defaults_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickDefaults, this));
mSettingsPanel->getChild<LLRadioGroup>("graphics_quality")->setCommitCallback(boost::bind(&LLFloaterPerformance::onChangeQuality, this, _2));
mSettingsPanel->getChild<LLCheckBoxCtrl>("advanced_lighting_model")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickAdvancedLighting, this));
mSettingsPanel->getChild<LLComboBox>("ShadowDetail")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickShadows, this));
@@ -477,6 +478,15 @@ void LLFloaterPerformance::onClickAdvanced()
LLFloaterReg::showInstance("prefs_graphics_advanced");
}
+void LLFloaterPerformance::onClickDefaults()
+{
+ LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->setRecommendedSettings();
+ }
+}
+
void LLFloaterPerformance::onChangeQuality(const LLSD& data)
{
LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");