From 462281b7f5a32e75e85b43eddd2c0f8d215d6ce4 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 31 Jan 2019 14:50:24 +0200 Subject: SL-10279 Update altitude value after slider correction --- indra/newview/llpanelenvironment.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/newview') 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(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); -- cgit v1.2.3