diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 836869a665..ebc332caa1 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -539,21 +539,21 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string n
gSavedSettings.setString("PresetGraphicActive", name);
// [FIRE-35390] Old viewer presets have these as true and 0.7, whereas the equivalent on modern viewers is false and 1.0
- gSavedSettings.setBOOL("RenderSkyAutoAdjustLegacy", false);
- gSavedSettings.setF32("RenderSkyAmbientScale", 1.0);
+ if (auto control = gSavedSettings.getControl("RenderSkyAutoAdjustLegacy"))
+ control->resetToDefault(true);
+ if (auto control = gSavedSettings.getControl("RenderSkyAmbientScale"))
+ control->resetToDefault(true);
//
// Update indirect controls
LLAvatarComplexityControls::setIndirectControls();
- LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences");
- if (instance)
+ if (LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"))
{
instance->refreshEnabledGraphics();
}
// Graphic preset controls independent from XUI
- FloaterQuickPrefs* phototools = LLFloaterReg::findTypedInstance(PHOTOTOOLS_FLOATER);
- if (phototools)
+ if (FloaterQuickPrefs* phototools = LLFloaterReg::findTypedInstance(PHOTOTOOLS_FLOATER))
{
phototools->refreshSettings();
}