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

GModel::readGEO must be a static member function, since the parser can
now create multiple models!
parent b4617114
Branches
Tags
No related merge requests found
......@@ -206,8 +206,7 @@ void ParseString(std::string str)
if(fp){
fprintf(fp, "%s\n", str.c_str());
fclose(fp);
ParseFile(fileName, true);
GModel::current()->importGEOInternals();
GModel::readGEO(fileName);
}
}
......@@ -363,10 +362,7 @@ int MergeFile(std::string fileName, bool warnIfMissing)
}
#endif
else {
// don't use readGEO here (ParseFile is allowed to change the
// current model)
ParseFile(fileName, true);
status = GModel::current()->importGEOInternals();
status = GModel::readGEO(fileName);
}
}
......
......@@ -314,7 +314,8 @@ class GModel
// Gmsh native CAD format
int importGEOInternals();
int readGEO(const std::string &name);
// read is static, since it can create multiple models
static int readGEO(const std::string &name);
int writeGEO(const std::string &name, bool printLabels=true);
// Fourier model
......
......@@ -38,7 +38,7 @@ void GModel::_deleteGEOInternals()
int GModel::readGEO(const std::string &name)
{
ParseFile(name, true);
return importGEOInternals();
return GModel::current()->importGEOInternals();
}
int GModel::importGEOInternals()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment