summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-11-09 02:48:07 (GMT)
committerMarius Kintel <marius@kintel.net>2011-11-09 02:48:07 (GMT)
commit5c30bcb691729b52c8456f57b42d6514a9325cf8 (patch)
treee7360a91d11729bc3d6a8b49d417445cf796021a /src/mainwin.cc
parent63c57065335f52148acc6f14d964b5aa9f105b52 (diff)
bugfix: Fix problem with progress bar sometimes jumping backwards
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index a6f5be6..22fb82c 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -433,7 +433,8 @@ static void report_func(const class AbstractNode*, void *vp, int mark)
#ifdef USE_PROGRESSWIDGET
ProgressWidget *pw = static_cast<ProgressWidget*>(vp);
int v = (int)((mark*100.0) / progress_report_count);
- pw->setValue(v < 100 ? v : 99);
+ int percent = v < 100 ? v : 99;
+ if (percent > pw->value()) pw->setValue(percent);
QApplication::processEvents();
if (pw->wasCanceled()) throw ProgressCancelException();
#else
contact: Jan Huwald // Impressum