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

hack

parent 29db91e2
No related branches found
No related tags found
No related merge requests found
......@@ -376,16 +376,18 @@ int MergeFile(const std::string &fileName, bool warnIfMissing)
#endif
#if defined(HAVE_ONELAB) && defined(HAVE_FLTK)
else if(ext == ".pro" && opt_solver_name(0, GMSH_GET, "") == "GetDP"){
// FIXME: this is a hack -- think about a better way
std::vector<std::string> split = SplitFileName(fileName);
GModel::current()->setName("");
status = MergeFile(split[0] + split[1] + ".geo");
CTX::instance()->lock = 0; // "uber hack for OpenProject in runGmshClient
solver_cb(0, 0);
return status;
}
#endif
#if defined(HAVE_ONELAB_METAMODEL) && defined(HAVE_FLTK)
else if(ext == ".ol"){
// TODO: allow passing action to metamodel from command line
// FIXME: this is a hack -- think about a better way
status = metamodel_cb(fileName);
}
#endif
......
......@@ -269,6 +269,8 @@ namespace onelabUtils {
if(action == "initialize") return redraw;
static std::string modelName = "";
// FIXME: need to check if mesh file date is newer than model file
// date... or at least find a better solution
if(modelName.empty()){
// first pass is special to prevent model reload, as well as
// remeshing if a mesh file already exists on disk
......@@ -280,8 +282,8 @@ namespace onelabUtils {
if(action == "check"){
if(onelab::server::instance()->getChanged("Gmsh") ||
modelName != GModel::current()->getName()){
// reload geometry if Gmsh parameters have been modified or if
// the model name has changed
// reload geometry if Gmsh parameters have been modified or if the model
// name has changed
modelName = GModel::current()->getName();
redraw = true;
OpenProject(GModel::current()->getFileName());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment