diff options
Diffstat (limited to 'src/gui/progressbar.cpp')
-rw-r--r-- | src/gui/progressbar.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 211f2fc5..aa396a70 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -117,7 +117,14 @@ float ProgressBar::getProgress() void ProgressBar::setColor(unsigned char MyRed, unsigned char MyGreen, unsigned char MyBlue) { - Red = MyRed; Green = MyGreen; Blue = MyBlue; - colorBar->fillWithColor(Red, Green, Blue); - colorBar->setAlpha(0.7f); + if ( (Red == MyRed) && (Green == MyGreen) && (Blue == MyBlue) ) + { + // Nothing + } + else + { + Red = MyRed; Green = MyGreen; Blue = MyBlue; + colorBar->fillWithColor(Red, Green, Blue); + colorBar->setAlpha(0.7f); + } } |