diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 0600d1d189ae7fe8bd5970a6ad74286066fd9154..5951889fdd34d823cc3460afacbed7d46bc6039f 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -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); diff --git a/Common/OpenFile.h b/Common/OpenFile.h index 2997f0e82fbbb068065cb063666032a80a62f79f..c27007cf5f5b301870cd0468457c311cfc983478 100644 --- a/Common/OpenFile.h +++ b/Common/OpenFile.h @@ -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();