summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-01-30 16:42:34 -0800
committerRider Linden <rider@lindenlab.com>2018-01-30 16:42:34 -0800
commit0bf50e2f8cfa5f3ccd6165ce935cf0fd9c174ced (patch)
tree4a161b5eaa5150775f13869d3d32ad5ae83d5904 /indra/newview/llfloaterland.cpp
parentfbd8a98300277bdbc1885c25eea290560fd8c6c1 (diff)
Cleanup on daycyle selection and stack. Move blenders into environment.
(Transition bronken, instant only. Shaddows moved based on region, not parcel)
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r--indra/newview/llfloaterland.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 18bf4a47b3..39dada1984 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -3283,8 +3283,19 @@ void LLPanelLandEnvironment::refresh()
F64Hours daylength;
F64Hours dayoffset;
- daylength = parcel->getDayLength();
- dayoffset = parcel->getDayOffset();
+ LLEnvironment::EnvSelection_t env = LLEnvironment::ENV_PARCEL;
+
+ if (!LLEnvironment::instance().hasEnvironment(env))
+ env = LLEnvironment::ENV_REGION;
+
+ daylength = LLEnvironment::instance().getEnvironmentDayLength(env);
+ dayoffset = LLEnvironment::instance().getEnvironmentDayOffset(env);
+
+ LLSettingsDay::ptr_t pday = LLEnvironment::instance().getEnvironmentDay(env);
+
+ mEditingDayCycle = pday->buildClone();
+
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mEditingDayCycle, daylength, dayoffset);
if (dayoffset.value() > 12.0)
dayoffset = dayoffset - F32Hours(24.0f);
@@ -3292,19 +3303,11 @@ void LLPanelLandEnvironment::refresh()
mDayLengthSlider->setValue(daylength.value());
mDayOffsetSlider->setValue(dayoffset.value());
- mRegionSettingsRadioGroup->setSelectedIndex(parcel->getUsesDefaultDayCycle() ? 0 : 1);
+ //mRegionSettingsRadioGroup->setSelectedIndex(parcel->getUsesDefaultDayCycle() ? 0 : 1);
+ mRegionSettingsRadioGroup->setSelectedIndex(1);
setControlsEnabled(owner_or_god);
- if (!parcel->getUsesDefaultDayCycle())
- mEditingDayCycle = parcel->getParcelDayCycle()->buildClone();
- else
- {
- LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
- if (regionp)
- mEditingDayCycle = regionp->getRegionDayCycle()->buildClone();
- }
-
}
void LLPanelLandEnvironment::doApply()