Skip to content
Snippets Groups Projects
Commit e2dc2b2f authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

missing initAdaptiveData when creating a new view in PView::combine
parent fb2e8928
No related branches found
No related tags found
No related merge requests found
...@@ -223,9 +223,20 @@ void PView::combine(bool time, int how, bool remove) ...@@ -223,9 +223,20 @@ void PView::combine(bool time, int how, bool remove)
PView *p = new PView(); PView *p = new PView();
PViewData *data = p->getData(); PViewData *data = p->getData();
bool res = time ? data->combineTime(nds[i]): data->combineSpace(nds[i]); bool res = time ? data->combineTime(nds[i]): data->combineSpace(nds[i]);
if(res) if(res){
for(unsigned int j = 0; j < nds[i].indices.size(); j++) for(unsigned int j = 0; j < nds[i].indices.size(); j++)
rm.insert(list[nds[i].indices[j]]); rm.insert(list[nds[i].indices[j]]);
PViewOptions *opt = p->getOptions();
if(opt->adaptVisualizationGrid){
// the (empty) adaptive data created in PView() must be
// recreated, since we added some data
data->destroyAdaptiveData();
data->initAdaptiveData
(opt->timeStep, opt->maxRecursionLevel, opt->targetError);
}
}
else else
delete p; delete p;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment