From 0884b0ec4a92e65ead7d1813fca00564b3dbce03 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 14 Feb 2021 22:27:16 +0100 Subject: [PATCH] Prevent toggling off atmospheric shaders when a @setsphere effect is active --- indra/newview/quickprefs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index b9d272ec4f..376f84bbea 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -616,7 +616,7 @@ BOOL FloaterQuickPrefs::postBuild() if (gRlvHandler.isEnabled()) { - enableWindlightButtons(!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)); + enableWindlightButtons(!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV) && !gRlvHandler.hasBehaviour(RLV_BHVR_SETSPHERE)); } // Dynamic quick prefs @@ -1026,7 +1026,7 @@ void FloaterQuickPrefs::refreshSettings() BOOL reflections = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps; mCtrlReflectionDetail->setEnabled(reflections); - mCtrlWindLight->setEnabled((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ); + mCtrlWindLight->setEnabled((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETSPHERE)) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ); LLTextBox* sky_label = getChild("T_Sky_Detail"); LLSlider* sky_slider = getChild("SB_Sky_Detail"); @@ -1170,7 +1170,7 @@ void FloaterQuickPrefs::refreshSettings() void FloaterQuickPrefs::updateRlvRestrictions(ERlvBehaviour behavior, ERlvParamType type) { - if (behavior == RLV_BHVR_SETENV) + if (behavior == RLV_BHVR_SETENV || behavior == RLV_BHVR_SETSPHERE) { enableWindlightButtons(type != RLV_TYPE_ADD); }