]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Provide correct static variable <aFilterManager> management to avoid problems, apperi...
authorjfa <jfa@opencascade.com>
Mon, 3 Oct 2005 13:01:36 +0000 (13:01 +0000)
committerjfa <jfa@opencascade.com>
Mon, 3 Oct 2005 13:01:36 +0000 (13:01 +0000)
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
src/SMESHGUI/SMESHGUI_FilterUtils.cxx
src/SMESHGUI/SMESHGUI_FilterUtils.h

index d481b7d9ca0848397e22b028e7f2d9fc359bbcd0..17f9fdc9b691bac480600eaf4e2a580d46e54023 100644 (file)
@@ -824,6 +824,7 @@ SalomeApp_Module( "SMESH" )
 SMESHGUI::~SMESHGUI()
 {
   SMESH::GetFilterManager()->Destroy();
+  SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
 }
 
 //=============================================================================
index c4ca04c3700328f0dc7709faa31141c1a512fa02..8ea1769f908446bd57b46afb8b17a8c629898aad 100644 (file)
@@ -1041,7 +1041,7 @@ void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
                              tr("ERROR_OF_DELETING"), QMessageBox::Ok);
   } else {
     myCurrFilterName = "";
-    myCurrFilterName = -1;
+    myCurrFilter = -1;
     myListBox->removeItem(anIndex);
 
     if (anIndex >= 1)
index 360d004869492e0f332c19b4bdfc0e5f9d02f518..e5c529f16266a91d76246f282931de4a34c0b936 100644 (file)
 
 #include "SMESHGUI.h"
 
+#include "utilities.h"
+
 namespace SMESH
 {
-  SMESH::FilterManager_var GetFilterManager()
+  SMESH::FilterManager_var& GetFilterManager()
   {
     static SMESH::FilterManager_var aFilterManager;
-    if (CORBA::is_nil(aFilterManager)){
-      aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
+    if (CORBA::is_nil(aFilterManager)) {
+        aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
     }
     return aFilterManager;
   }
index 85bd3d01a5bccf841798cdfb976fe6628ab29878..6b8c758626b46f9cf3a1bd9df671e68a614a88de 100644 (file)
@@ -26,7 +26,7 @@
 
 namespace SMESH{
 
-  SMESH::FilterManager_var GetFilterManager();
+  SMESH::FilterManager_var& GetFilterManager();
 
 }