summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-10-22 15:36:22 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-10-22 15:36:22 +0300
commitd2428d53b5816ce33adf10423ae7bb8229d4b915 (patch)
tree2ce04bb3e2b3b30b60ebb0b7d8b4dff3043a5735 /indra
parent91615351b56cbf36ef26fdd05fb3212414a2d679 (diff)
SL-9911 FIXED [EEP] Day Settings are modifiable in About Land floater for parcel that uses Region Settings
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelenvironment.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index a260f98181..35a998edf6 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -204,15 +204,15 @@ void LLPanelEnvironmentInfo::refresh()
return;
}
+ S32 rdo_selection = 0;
if ((!mCurrentEnvironment->mDayCycle) ||
((mCurrentEnvironment->mParcelId == INVALID_PARCEL_ID) && (mCurrentEnvironment->mDayCycle->getAssetId() == LLSettingsDay::GetDefaultAssetId() )))
{
- getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->setSelectedIndex(0);
getChild<LLUICtrl>(EDT_INVNAME)->setValue("");
}
else if (!mCurrentEnvironment->mDayCycle->getAssetId().isNull())
{
- getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->setSelectedIndex(1);
+ rdo_selection = 1;
LLUUID asset_id = mCurrentEnvironment->mDayCycle->getAssetId();
@@ -225,9 +225,10 @@ void LLPanelEnvironmentInfo::refresh()
}
else
{ // asset id is null so this is a custom environment
- getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->setSelectedIndex(2);
+ rdo_selection = 2;
getChild<LLUICtrl>(EDT_INVNAME)->setValue("");
}
+ getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->setSelectedIndex(rdo_selection);
F32Hours daylength(mCurrentEnvironment->mDayLength);
F32Hours dayoffset(mCurrentEnvironment->mDayOffset);
@@ -237,6 +238,8 @@ void LLPanelEnvironmentInfo::refresh()
getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setValue(daylength.value());
getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setValue(dayoffset.value());
+ getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setEnabled(canEdit() && (rdo_selection != 0) && !mCurrentEnvironment->mIsLegacy);
+ getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setEnabled(canEdit() && (rdo_selection != 0) && !mCurrentEnvironment->mIsLegacy);
udpateApparentTimeOfDay();