summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-06-05 01:52:03 (GMT)
committerMarius Kintel <marius@kintel.net>2013-06-06 00:24:26 (GMT)
commit6409f0e35412b3b13329bb207e260b7d28640b0f (patch)
treef47f548725aa118a0abf3b7af2545a82a1ca47ac /src/mainwin.cc
parent0e0917f66dc5e3bed037fd24c6ed154230ae646b (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.cc10
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();
}
contact: Jan Huwald // Impressum