diff --git a/src/plugins/coreplugin/progressmanager/progressbar.cpp b/src/plugins/coreplugin/progressmanager/progressbar.cpp index fc4a2189027ff003ede7d1d29a74485e144e355f..c272c5f47e91a30f8423e7e042ef363ef3227c15 100644 --- a/src/plugins/coreplugin/progressmanager/progressbar.cpp +++ b/src/plugins/coreplugin/progressmanager/progressbar.cpp @@ -134,7 +134,7 @@ void ProgressBar::paintEvent(QPaintEvent *) bar.load(QLatin1String(":/core/images/progressbar.png")); double range = maximum() - minimum(); - double percent = 0.50; + double percent = 0.; if (range != 0) percent = (value() - minimum()) / range; if (percent > 1) @@ -195,7 +195,7 @@ void ProgressBar::paintEvent(QPaintEvent *) // avoid too small red bar if (inner.width() < 10) inner.adjust(0, 0, 10 - inner.width(), 0); - } else if (value() == maximum()) { + } else if (value() == maximum() && range != 0) { c = QColor(90, 170, 60); }