diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-12-07 17:10:05 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-12-07 17:10:05 +0200 |
commit | 6762c4515a9b0f98164d6efd191abec5ca4dd211 (patch) | |
tree | 8f6f88ec54a3e09babb65c263dff1b53e2960051 /indra/newview/llpanelenvironment.cpp | |
parent | d4fe87cca49162c978b4eacde880431977624874 (diff) |
SL-1894 When crossing regions altitude slider could misbehave
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 04f281a40c..7abb05b6fb 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -255,13 +255,19 @@ void LLPanelEnvironmentInfo::refresh() LLEnvironment::altitude_list_t altitudes = LLEnvironment::instance().getRegionAltitudes(); if (altitudes.size() > 0) { + LLMultiSliderCtrl *sld = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES); + sld->clear(); + for (S32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; ++idx) { - LLMultiSliderCtrl *sld = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES); - sld->setSliderValue(alt_sliders[idx], altitudes[idx+1], FALSE); + sld->addSlider(altitudes[idx + 1], alt_sliders[idx]); updateAltLabel(alt_labels[idx], idx + 2, altitudes[idx+1]); mAltitudes[alt_sliders[idx]] = AltitudeData(idx+1, idx, altitudes[idx+1]); } + if (sld->getCurNumSliders() != ALTITUDE_SLIDER_COUNT) + { + LL_WARNS("ENVPANEL") << "Failed to add altitude sliders!" << LL_ENDL; + } readjustAltLabels(); } |