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-05 01:52:03 (GMT)
commitc719dde9719b7063247f6d6e149e66e75fbcf40a (patch)
tree9b6d31b98843c1247b8a022320da020f9de75bdd /src/mainwin.cc
parentc5f792e99203a531870287b1c4a0df73b9294bbf (diff)
More frequent progress updates, progress updates also for CSG evaluation
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 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();
}
contact: Jan Huwald // Impressum