From 638fb7bc09a75e55be1881a5073da2975ca16ff2 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 10 Apr 2013 07:47:17 +0000
Subject: [PATCH] add GmshMergePostProcessing to the API

---
 Common/Gmsh.cpp | 12 +++++++++---
 Common/Gmsh.h   |  3 ++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp
index 5b2cf7d9f3..f5d761d952 100644
--- a/Common/Gmsh.cpp
+++ b/Common/Gmsh.cpp
@@ -127,15 +127,21 @@ int GmshGetOption(const std::string &category, const std::string &name,
   return ColorOption(GMSH_GET, category.c_str(), index, name.c_str(), value);
 }
 
+int GmshOpenProject(const std::string &fileName)
+{
+  OpenProject(fileName);
+  return 1;
+}
+
 int GmshMergeFile(const std::string &fileName)
 {
   return MergeFile(fileName, true);
 }
 
-int GmshOpenProject(const std::string &fileName)
+int GmshMergePostProcessingFile(const std::string &fileName)
 {
-  OpenProject(fileName);
-  return 1;
+  return MergePostProcessingFile(fileName, CTX::instance()->solver.autoShowLastStep,
+                                 CTX::instance()->solver.autoHideNewViews, true);
 }
 
 int GmshWriteFile(const std::string &fileName)
diff --git a/Common/Gmsh.h b/Common/Gmsh.h
index a0c5e1ff4c..28e7f05667 100644
--- a/Common/Gmsh.h
+++ b/Common/Gmsh.h
@@ -26,8 +26,9 @@ int GmshGetOption(const std::string &category, const std::string &name,
                   double &value, int index=0);
 int GmshGetOption(const std::string &category, const std::string &name,
                   unsigned int &value, int index=0);
-int GmshMergeFile(const std::string &fileName);
 int GmshOpenProject(const std::string &fileName);
+int GmshMergeFile(const std::string &fileName);
+int GmshMergePostProcessingFile(const std::string &fileName);
 int GmshWriteFile(const std::string &fileName);
 int GmshFinalize();
 int GmshBatch();
-- 
GitLab