#1567 background and highlight objects were not cleared between renders
This commit is contained in:
parent
aee6119f00
commit
1c01100db7
1 changed files with 10 additions and 4 deletions
|
|
@ -1191,24 +1191,30 @@ void MainWindow::compileCSG(bool procevents)
|
||||||
PRINTB("Compiling highlights (%d CSG Trees)...", highlight_terms.size());
|
PRINTB("Compiling highlights (%d CSG Trees)...", highlight_terms.size());
|
||||||
if (procevents) QApplication::processEvents();
|
if (procevents) QApplication::processEvents();
|
||||||
|
|
||||||
highlights_products.reset(new CSGProducts());
|
this->highlights_products.reset(new CSGProducts());
|
||||||
for (unsigned int i = 0; i < highlight_terms.size(); i++) {
|
for (unsigned int i = 0; i < highlight_terms.size(); i++) {
|
||||||
shared_ptr<CSGNode> nterm = normalizer.normalize(highlight_terms[i]);
|
shared_ptr<CSGNode> nterm = normalizer.normalize(highlight_terms[i]);
|
||||||
highlights_products->import(nterm);
|
this->highlights_products->import(nterm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this->highlights_products.reset();
|
||||||
|
}
|
||||||
|
|
||||||
const std::vector<shared_ptr<CSGNode> > &background_terms = csgrenderer.getBackgroundNodes();
|
const std::vector<shared_ptr<CSGNode> > &background_terms = csgrenderer.getBackgroundNodes();
|
||||||
if (background_terms.size() > 0) {
|
if (background_terms.size() > 0) {
|
||||||
PRINTB("Compiling background (%d CSG Trees)...", background_terms.size());
|
PRINTB("Compiling background (%d CSG Trees)...", background_terms.size());
|
||||||
if (procevents) QApplication::processEvents();
|
if (procevents) QApplication::processEvents();
|
||||||
|
|
||||||
background_products.reset(new CSGProducts());
|
this->background_products.reset(new CSGProducts());
|
||||||
for (unsigned int i = 0; i < background_terms.size(); i++) {
|
for (unsigned int i = 0; i < background_terms.size(); i++) {
|
||||||
shared_ptr<CSGNode> nterm = normalizer.normalize(background_terms[i]);
|
shared_ptr<CSGNode> nterm = normalizer.normalize(background_terms[i]);
|
||||||
background_products->import(nterm);
|
this->background_products->import(nterm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this->background_products.reset();
|
||||||
|
}
|
||||||
|
|
||||||
if (this->root_products &&
|
if (this->root_products &&
|
||||||
(this->root_products->size() >
|
(this->root_products->size() >
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue