summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CSGTermEvaluator.cc3
-rw-r--r--src/mainwin.cc10
2 files changed, 8 insertions, 5 deletions
diff --git a/src/CSGTermEvaluator.cc b/src/CSGTermEvaluator.cc
index a6b654c..71cf149 100644
--- a/src/CSGTermEvaluator.cc
+++ b/src/CSGTermEvaluator.cc
@@ -115,6 +115,7 @@ Response CSGTermEvaluator::visit(State &state, const AbstractPolyNode &node)
if (ps) {
t1 = evaluate_csg_term_from_ps(state, this->highlights, this->background,
ps, node.modinst, node);
+ node.progress_report();
}
}
this->stored_term[node.index()] = t1;
@@ -178,6 +179,7 @@ Response CSGTermEvaluator::visit(State &state, const RenderNode &node)
shared_ptr<PolySet> ps;
if (this->psevaluator) {
ps = this->psevaluator->getPolySet(node, true);
+ node.progress_report();
}
if (ps) {
t1 = evaluate_csg_term_from_ps(state, this->highlights, this->background,
@@ -201,6 +203,7 @@ Response CSGTermEvaluator::visit(State &state, const CgaladvNode &node)
if (ps) {
t1 = evaluate_csg_term_from_ps(state, this->highlights, this->background,
ps, node.modinst, node);
+ node.progress_report();
}
this->stored_term[node.index()] = t1;
addToParent(state, node);
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