Reset controls properly based on default value from settings.xml
parent
3b07d5ee69
commit
2cff929d0a
|
|
@ -539,21 +539,21 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string n
|
|||
gSavedSettings.setString("PresetGraphicActive", name);
|
||||
|
||||
// <FS> [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);
|
||||
// </FS>
|
||||
|
||||
// <FS:Ansariel> Update indirect controls
|
||||
LLAvatarComplexityControls::setIndirectControls();
|
||||
|
||||
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
|
||||
if (instance)
|
||||
if (LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"))
|
||||
{
|
||||
instance->refreshEnabledGraphics();
|
||||
}
|
||||
// <FS:Ansariel> Graphic preset controls independent from XUI
|
||||
FloaterQuickPrefs* phototools = LLFloaterReg::findTypedInstance<FloaterQuickPrefs>(PHOTOTOOLS_FLOATER);
|
||||
if (phototools)
|
||||
if (FloaterQuickPrefs* phototools = LLFloaterReg::findTypedInstance<FloaterQuickPrefs>(PHOTOTOOLS_FLOATER))
|
||||
{
|
||||
phototools->refreshSettings();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue