diff options
author | Tametomo <irarice@gmail.com> | 2009-05-12 12:19:46 -0600 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-14 20:54:02 +0100 |
commit | 751f21a4bde7384dd91b376c151d01d4b3d5cf9d (patch) | |
tree | 9abc7e5e86fb1b7a64cec5137ba8c6e9de65b4d2 /src/gui/widgets | |
parent | 2c78f1565306b37b0f728762a398fb3951322b0c (diff) | |
download | mana-client-751f21a4bde7384dd91b376c151d01d4b3d5cf9d.tar.gz mana-client-751f21a4bde7384dd91b376c151d01d4b3d5cf9d.tar.bz2 mana-client-751f21a4bde7384dd91b376c151d01d4b3d5cf9d.tar.xz mana-client-751f21a4bde7384dd91b376c151d01d4b3d5cf9d.zip |
Reduce the number of necessary logic checks, in order to improve
performance in ProgressBar logic loops.
Signed-off-by: Tametomo <irarice@gmail.com>
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 98c31873..d31b6853 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -94,7 +94,7 @@ ProgressBar::~ProgressBar() void ProgressBar::logic() { - if (mSmoothColorChange) + if (mSmoothColorChange && mColorToGo != mColor) { // Smoothly changing the color for a nicer effect. if (mColorToGo.r > mColor.r) @@ -111,7 +111,7 @@ void ProgressBar::logic() mColor.b--; } - if (mSmoothProgress) + if (mSmoothProgress && mProgressToGo != mProgress) { // Smoothly showing the progressbar changes. if (mProgressToGo > mProgress) |