diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-01-31 14:50:24 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-01-31 14:50:24 +0200 |
commit | 462281b7f5a32e75e85b43eddd2c0f8d215d6ce4 (patch) | |
tree | 6f28ab95673369bd502eca78bbd3205fdd5b882f | |
parent | afe5578315fa379b2078b2309bcace0a0b6f3798 (diff) |
SL-10279 Update altitude value after slider correction
-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); |