summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-07-01 00:08:45 (GMT)
committerMarius Kintel <marius@kintel.net>2012-07-01 00:08:45 (GMT)
commit54067c635d1a6de4509930ed9d8593f5373f2ba1 (patch)
tree5f5a8cd6989a30dd021bcca99a56ed0c0587a0c2 /src/mainwin.cc
parent431a24b4973069c86728f28efa62930354f92f6d (diff)
Fixed normalization bug: node limit wasn't checked properly and some cases triggered exponential expansion of nodes during normalization. Fixes #127
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 087cb30..08fbec5 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -719,9 +719,9 @@ void MainWindow::compileCSG(bool procevents)
if (procevents)
QApplication::processEvents();
- CSGTermNormalizer normalizer;
size_t normalizelimit = 2 * Preferences::inst()->getValue("advanced/openCSGLimit").toUInt();
- this->root_norm_term = normalizer.normalize(this->root_raw_term, normalizelimit);
+ CSGTermNormalizer normalizer(normalizelimit);
+ this->root_norm_term = normalizer.normalize(this->root_raw_term);
if (this->root_norm_term) {
this->root_chain = new CSGChain();
this->root_chain->import(this->root_norm_term);
@@ -741,7 +741,7 @@ void MainWindow::compileCSG(bool procevents)
highlights_chain = new CSGChain();
for (unsigned int i = 0; i < highlight_terms.size(); i++) {
- highlight_terms[i] = normalizer.normalize(highlight_terms[i], normalizelimit);
+ highlight_terms[i] = normalizer.normalize(highlight_terms[i]);
highlights_chain->import(highlight_terms[i]);
}
}
@@ -754,7 +754,7 @@ void MainWindow::compileCSG(bool procevents)
background_chain = new CSGChain();
for (unsigned int i = 0; i < background_terms.size(); i++) {
- background_terms[i] = normalizer.normalize(background_terms[i], normalizelimit);
+ background_terms[i] = normalizer.normalize(background_terms[i]);
background_chain->import(background_terms[i]);
}
}
contact: Jan Huwald // Impressum