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.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 2a22dd461a..43b359e003 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2722,6 +2722,16 @@ void LLPanelPreferenceGraphics::cancel()
void LLPanelPreferenceGraphics::saveSettings()
{
resetDirtyChilds();
+ std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive");
+ if (preset_graphic_active.empty())
+ {
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ //don't restore previous preset after closing Preferences
+ instance->saveGraphicsPreset(preset_graphic_active);
+ }
+ }
LLPanelPreference::saveSettings();
}
void LLPanelPreferenceGraphics::setHardwareDefaults()