From 54c022f1b6162656363bc7b659363170afdf6f1d Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 20 Feb 2019 17:35:22 +0200 Subject: SL-10568 Disable controls on non-eep region --- indra/newview/llpanelenvironment.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 06504bac37..ca9c8bdffa 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -486,18 +486,18 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) getChild(PNL_ENVIRONMENT_ALTITUDES)->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled()); getChild(BTN_RST_ALTITUDES)->setVisible(isRegion()); - bool can_enable = enabled && mCurrentEnvironment && (mCurEnvVersion != INVALID_PARCEL_ENVIRONMENT_VERSION); - getChild(BTN_SELECTINV)->setEnabled(can_enable && !is_legacy); - getChild(BTN_USEDEFAULT)->setEnabled(can_enable && !is_legacy); + bool can_enable = enabled && !is_legacy && mCurrentEnvironment && (mCurEnvVersion != INVALID_PARCEL_ENVIRONMENT_VERSION); + getChild(BTN_SELECTINV)->setEnabled(can_enable); + getChild(BTN_USEDEFAULT)->setEnabled(can_enable); getChild(BTN_EDIT)->setEnabled(can_enable); - getChild(SLD_DAYLENGTH)->setEnabled(can_enable && !is_legacy); - getChild(SLD_DAYOFFSET)->setEnabled(can_enable && !is_legacy); - getChild(SLD_ALTITUDES)->setEnabled(can_enable && isRegion() && !is_legacy); - getChild(ICN_GROUND)->setColor((can_enable && isRegion() && !is_legacy) ? LLColor4::white : LLColor4::grey % 0.8f); - getChild(ICN_WATER)->setColor((can_enable && isRegion() && !is_legacy) ? LLColor4::white : LLColor4::grey % 0.8f); - getChild(BTN_RST_ALTITUDES)->setEnabled(can_enable && isRegion() && !is_legacy); - getChild(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(can_enable && !is_legacy); - getChild(CHK_ALLOWOVERRIDE)->setEnabled(can_enable && isRegion() && !is_legacy); + getChild(SLD_DAYLENGTH)->setEnabled(can_enable); + getChild(SLD_DAYOFFSET)->setEnabled(can_enable); + getChild(SLD_ALTITUDES)->setEnabled(can_enable && isRegion()); + getChild(ICN_GROUND)->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f); + getChild(ICN_WATER)->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f); + getChild(BTN_RST_ALTITUDES)->setEnabled(can_enable && isRegion()); + getChild(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(can_enable); + getChild(CHK_ALLOWOVERRIDE)->setEnabled(can_enable && isRegion()); for (U32 idx = 0; idx < ALTITUDE_MARKERS_COUNT; idx++) { @@ -505,7 +505,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) if (marker) { static LLColor4 marker_color(0.75f, 0.75f, 0.75f, 1.f); - marker->setColor((can_enable && isRegion() && !is_legacy) ? marker_color : marker_color % 0.3f); + marker->setColor((can_enable && isRegion()) ? marker_color : marker_color % 0.3f); } } @@ -514,7 +514,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) LLSettingsDropTarget* drop_target = findChild("sdt_" + alt_prefixes[idx]); if (drop_target) { - drop_target->setDndEnabled(can_enable && !is_legacy); + drop_target->setDndEnabled(can_enable); } } -- cgit v1.2.3