diff options
author | Richard Linden <none@none> | 2013-10-29 16:23:53 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-29 16:23:53 -0700 |
commit | 155ca2f926afcbfd86b42ce6db68684ed266ef67 (patch) | |
tree | 97aea622157fa278243bd69a697ec2020084932b /indra/llui | |
parent | 41394354dd6410fd81f9ab22264625e90e1e2f58 (diff) |
fixed timer bars not appearing in fast timer view
fixed "bouncing" stat values when a value ended in zeroes
Diffstat (limited to 'indra/llui')
-rwxr-xr-x | indra/llui/llstatbar.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 24256c3193..2b325c27f0 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -327,6 +327,7 @@ void LLStatBar::draw() ? mNumHistoryFrames : mNumShortHistoryFrames; S32 num_rapid_changes = 0; + S32 decimal_digits = mDecimalDigits; switch(mStatType) { @@ -374,6 +375,10 @@ void LLStatBar::draw() display_value = current; // always display current value, don't rate limit mLastDisplayValue = current; + if (is_approx_equal((F32)(S32)display_value, display_value)) + { + decimal_digits = 0; + } } } break; @@ -412,12 +417,6 @@ void LLStatBar::draw() mCurMaxBar = LLSmoothInterpolation::lerp(mCurMaxBar, mMaxBar, 0.05f); mCurMinBar = LLSmoothInterpolation::lerp(mCurMinBar, mMinBar, 0.05f); - S32 decimal_digits = mDecimalDigits; - if (is_approx_equal((F32)(S32)display_value, display_value)) - { - decimal_digits = 0; - } - // rate limited updates if (mLastDisplayValueTimer.getElapsedTimeF32() < MEAN_VALUE_UPDATE_TIME) { |