diff options
author | Rider Linden <rider@lindenlab.com> | 2019-01-31 17:45:10 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2019-01-31 17:45:10 +0000 |
commit | fc5f897a1d6b57b93a33e894675645b6216fadfe (patch) | |
tree | 03978669d8819e745764c53c3d21addb20d3a0cd /indra/newview | |
parent | aec5fc3607b8efb5cc3d035df978e59f9ac5bce2 (diff) | |
parent | 462281b7f5a32e75e85b43eddd2c0f8d215d6ce4 (diff) |
Merged in maxim_productengine/viewer-eep (pull request #249)
SL-10279 Update altitude value after slider correction
Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 8f279c07ba..d20cc096de 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -263,6 +263,7 @@ void LLPanelEnvironmentInfo::refresh() updateEditFloater(mCurrentEnvironment, canEdit()); LLEnvironment::altitude_list_t altitudes = LLEnvironment::instance().getRegionAltitudes(); + if (altitudes.size() > 0) { LLMultiSliderCtrl *sld = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES); @@ -294,16 +295,16 @@ void LLPanelEnvironmentInfo::refresh() res = sld->addSlider(altitude, alt_sliders[idx]); if (res) break; } - if (!res) - { - // Something is very very wrong - LL_WARNS_ONCE("ENVPANEL") << "Failed to set up altitudes for parcel id " << getParcelId() << LL_ENDL; - } - else - { - // slider has some auto correction that might have kicked in - altitude = sld->getSliderValue(alt_sliders[idx]); - } + } + if (res) + { + // slider has some auto correction that might have kicked in + altitude = sld->getSliderValue(alt_sliders[idx]); + } + else + { + // Something is very very wrong + LL_WARNS_ONCE("ENVPANEL") << "Failed to set up altitudes for parcel id " << getParcelId() << LL_ENDL; } updateAltLabel(alt_prefixes[idx], idx + 2, altitude); mAltitudes[alt_sliders[idx]] = AltitudeData(idx + 2, idx, altitude); |