diff options
author | Marius Kintel <marius@kintel.net> | 2013-06-05 01:52:03 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-06-05 01:52:03 (GMT) |
commit | c719dde9719b7063247f6d6e149e66e75fbcf40a (patch) | |
tree | 9b6d31b98843c1247b8a022320da020f9de75bdd /src/mainwin.cc | |
parent | c5f792e99203a531870287b1c4a0df73b9294bbf (diff) |
More frequent progress updates, progress updates also for CSG evaluation
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index febb325..597a094 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -468,12 +468,12 @@ void MainWindow::showProgress() void MainWindow::report_func(const class AbstractNode*, void *vp, int mark) { MainWindow *thisp = static_cast<MainWindow*>(vp); - int v = (int)((mark*100.0) / progress_report_count); - int percent = v < 100 ? v : 99; - - if (percent > thisp->progresswidget->value()) { + int v = (int)((mark*1000.0) / progress_report_count); + int permille = v < 1000 ? v : 999; + printf("Progress: %d\n", permille); + if (permille > thisp->progresswidget->value()) { QMetaObject::invokeMethod(thisp->progresswidget, "setValue", Qt::QueuedConnection, - Q_ARG(int, percent)); + Q_ARG(int, permille)); QApplication::processEvents(); } |