diff --git a/src/libtomahawk/widgets/StatsGauge.cpp b/src/libtomahawk/widgets/StatsGauge.cpp index 9d52a7655..499fba9f0 100644 --- a/src/libtomahawk/widgets/StatsGauge.cpp +++ b/src/libtomahawk/widgets/StatsGauge.cpp @@ -28,6 +28,7 @@ #include #include #include +#include StatsGauge::StatsGauge( QWidget* parent ) @@ -110,8 +111,11 @@ StatsGauge::paintEvent( QPaintEvent* event ) void StatsGauge::setValue( int v ) { + if ( maximum() == 0 ) + return; + QPropertyAnimation* a = new QPropertyAnimation( (QProgressBar*)this, "value" ); - a->setEasingCurve( QEasingCurve( QEasingCurve::InOutQuad ) ); + a->setEasingCurve( QEasingCurve( QEasingCurve::OutQuad ) ); a->setStartValue( value() > 0 ? value() : 1 ); a->setEndValue( v ); a->setDuration( 2000 );