diff --git a/src/VirtualLeaf.cpp b/src/VirtualLeaf.cpp --- a/src/VirtualLeaf.cpp +++ b/src/VirtualLeaf.cpp @@ -507,7 +507,8 @@ int main(int argc,char **argv) { if (useGUI) model_catalogue.PopulateModelMenu(); model_catalogue.InstallFirstModel(); - + + mesh.Clean(); main_window->Init(leaffile); Cell::SetMagnification(1); diff --git a/src/modelcatalogue.cpp b/src/modelcatalogue.cpp --- a/src/modelcatalogue.cpp +++ b/src/modelcatalogue.cpp @@ -145,17 +145,17 @@ void ModelCatalogue::InstallModel(QActio void ModelCatalogue::InstallModel(SimPluginInterface *plugin) { - // make sure both main and plugin use the same static datamembers (ncells, nchems...) - plugin->SetCellsStaticDatamembers(CellBase::GetStaticDataMemberPointer()); + // make sure both main and plugin use the same static datamembers (ncells, nchems...) + plugin->SetCellsStaticDatamembers(CellBase::GetStaticDataMemberPointer()); - mesh->SetSimPlugin(plugin); - Cell::SetNChem(plugin->NChem()); - plugin->SetParameters(&par); + mesh->SetSimPlugin(plugin); + Cell::SetNChem(plugin->NChem()); + plugin->SetParameters(&par); - if (mainwin) { - mainwin->RefreshInfoBar(); - mainwin->Init(0); - } - // mesh->StandardInit(); + if (mainwin) { + mainwin->RefreshInfoBar(); + mainwin->Init(0); + } + // mesh->StandardInit(); }