diff options
author | Rider Linden <rider@lindenlab.com> | 2019-03-29 16:13:52 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2019-03-29 16:13:52 +0000 |
commit | ad236703a61dae0ce4f4aa09282d8882daed23f4 (patch) | |
tree | 1e572202561b66a8b32ec015a468ca8b76f276ea | |
parent | f57a02e9ab2a75628ad4149a35f6edc24c5dbf0e (diff) | |
parent | 0a6d87458149fed16f98aac59447307c006db4b7 (diff) |
Merged in andreykproductengine/maint-eep (pull request #315)
SL-10766 and SL-9650
Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
Approved-by: Rider Linden <rider@lindenlab.com>
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index b343c913e5..cda1137182 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -191,6 +191,8 @@ BOOL LLPanelEnvironmentInfo::postBuild() { drop_target->setPanel(this, alt_sliders[idx]); } + // set initial values to prevent [ALTITUDE] from displaying + updateAltLabel(alt_prefixes[idx], idx + 2, idx * 1000); } getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]); getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]); @@ -686,30 +688,36 @@ void LLPanelEnvironmentInfo::readjustAltLabels() void LLPanelEnvironmentInfo::onSldDayLengthChanged(F32 value) { - F32Hours daylength(value); + if (mCurrentEnvironment) + { + F32Hours daylength(value); - mCurrentEnvironment->mDayLength = daylength; - setDirtyFlag(DIRTY_FLAG_DAYLENGTH); + mCurrentEnvironment->mDayLength = daylength; + setDirtyFlag(DIRTY_FLAG_DAYLENGTH); - udpateApparentTimeOfDay(); + udpateApparentTimeOfDay(); + } } void LLPanelEnvironmentInfo::onSldDayOffsetChanged(F32 value) { - F32Hours dayoffset(value); + if (mCurrentEnvironment) + { + F32Hours dayoffset(value); - if (dayoffset.value() <= 0.0f) - dayoffset += F32Hours(24.0); + if (dayoffset.value() <= 0.0f) + dayoffset += F32Hours(24.0); - mCurrentEnvironment->mDayOffset = dayoffset; - setDirtyFlag(DIRTY_FLAG_DAYOFFSET); + mCurrentEnvironment->mDayOffset = dayoffset; + setDirtyFlag(DIRTY_FLAG_DAYOFFSET); - udpateApparentTimeOfDay(); + udpateApparentTimeOfDay(); + } } void LLPanelEnvironmentInfo::onDayLenOffsetMouseUp() { - if (getDirtyFlag() & (DIRTY_FLAG_DAYLENGTH | DIRTY_FLAG_DAYOFFSET)) + if (mCurrentEnvironment && (getDirtyFlag() & (DIRTY_FLAG_DAYLENGTH | DIRTY_FLAG_DAYOFFSET))) { clearDirtyFlag(DIRTY_FLAG_DAYOFFSET); clearDirtyFlag(DIRTY_FLAG_DAYLENGTH); |