diff options
author | Marius Kintel <marius@kintel.net> | 2013-06-05 01:52:03 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-06-06 00:24:26 (GMT) |
commit | 6409f0e35412b3b13329bb207e260b7d28640b0f (patch) | |
tree | f47f548725aa118a0abf3b7af2545a82a1ca47ac /src/mainwin.cc | |
parent | 0e0917f66dc5e3bed037fd24c6ed154230ae646b (diff) |
More frequent progress updates, progress updates also for CSG evaluation
Conflicts:
src/ProgressWidget.ui
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 9c427cf..b4c1ed5 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -462,12 +462,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(); } |