Salome HOME
0020105: EDF 862 SMESH : Creation of the skin elements (2D) of a 3D Mesh
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_FilterUtils.cxx
index f02434220c8ccc8726cb4728fbc2bfccecd4342c..d7ce02e58724b04d8200da658f4e7e73a4de6df3 100644 (file)
@@ -1,4 +1,6 @@
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
 //  This library is free software; you can redistribute it and/or
 //  License along with this library; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-
-
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// SMESH SMESHGUI : GUI for SMESH component
+// File   : SMESHGUI_FilterUtils.cxx
+// Author : Open CASCADE S.A.S.
+// SMESH includes
+//
 #include "SMESHGUI_FilterUtils.h"
 
 #include "SMESHGUI.h"
 
 namespace SMESH
 {
-  SMESH::FilterManager_var GetFilterManager()
+  SMESH::FilterManager_var& GetFilterManager()
   {
-    return SMESHGUI::GetSMESHGen()->CreateFilterManager(); // DumpPython
+    static SMESH::FilterManager_var aFilterManager;
+    if (CORBA::is_nil(aFilterManager)) {
+        aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
+    }
+    return aFilterManager;
   }
-}
+} // end of namespace SMESH