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

MergePostProcessingFile now only changes the bounding box if no bounding box exists

parent 61ac7c43
No related branches found
No related tags found
No related merge requests found
......@@ -262,7 +262,8 @@ static int defineSolver(const std::string &name)
return NUM_SOLVERS - 1;
}
int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTitle)
int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTitle,
bool setBoundingBox)
{
if(GModel::current()->getName() == ""){
GModel::current()->setFileName(fileName);
......@@ -470,7 +471,7 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTit
}
ComputeMaxEntityNum();
SetBoundingBox();
if(setBoundingBox) SetBoundingBox();
CTX::instance()->geom.draw = 1;
CTX::instance()->mesh.changed = ENT_ALL;
......@@ -542,7 +543,8 @@ int MergePostProcessingFile(const std::string &fileName, bool showLastStep,
GModel *m = new GModel();
GModel::setCurrent(m);
}
int ret = MergeFile(fileName, warnIfMissing);
int ret = MergeFile(fileName, warnIfMissing, true,
old->bounds().empty() ? true : false);
GModel::setCurrent(old);
old->setVisibility(1);
......
......@@ -13,7 +13,7 @@ void ParseString(const std::string &str);
void OpenProject(const std::string &filename, bool setWindowTitle=true);
void OpenProjectMacFinder(const char *fileName);
int MergeFile(const std::string &fileName, bool warnIfMissing=false,
bool setWindowTitle=true);
bool setWindowTitle=true, bool setBoundingBox=true);
int MergePostProcessingFile(const std::string &fileName, bool showLastStep=false,
bool hideNewViews=false, bool warnIfMissing=false);
void ClearProject();
......
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