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

fix setting of GModel::fileName when Merging multiple files

parent 355fb61b
No related branches found
No related tags found
No related merge requests found
......@@ -338,6 +338,7 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setBoundingB
#endif
int status = 0;
#if defined(HAVE_ONELAB)
std::string solver = getSolverForExtension(ext);
if(solver.size()){
......@@ -361,8 +362,13 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setBoundingB
CTX::instance()->geom.draw = 1;
return 1;
}
else
#endif
if(GModel::current()->getName() == ""){
GModel::current()->setFileName(fileName);
GModel::current()->setName(SplitFileName(fileName)[1]);
}
if(ext == ".stl" || ext == ".STL"){
status = GModel::current()->readSTL(fileName, CTX::instance()->geom.tolerance);
}
......@@ -499,11 +505,6 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setBoundingB
}
}
if(GModel::current()->getName() == ""){
GModel::current()->setFileName(fileName);
GModel::current()->setName(SplitFileName(fileName)[1]);
}
ComputeMaxEntityNum();
if(setBoundingBox) SetBoundingBox();
CTX::instance()->geom.draw = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment