]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix problem in Mesh module on closing study operation (reference to the non existent...
authorvsr <vsr@opencascade.com>
Tue, 29 Sep 2009 14:11:58 +0000 (14:11 +0000)
committervsr <vsr@opencascade.com>
Tue, 29 Sep 2009 14:11:58 +0000 (14:11 +0000)
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_Gen_i.hxx

index 514eb938067386d3522f896d2a2760b68083f3d3..dbf4fe43e57251a6a08f29f2cfcfa26b58e04fd1 100644 (file)
@@ -4195,6 +4195,7 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
 //     context->myDocument = 0;
 //   }
   
+  myCurrentStudy = SALOMEDS::Study::_nil();
   return;
 }
 
@@ -4316,6 +4317,11 @@ void SMESH_Gen_i::SetName(const char* theIOR,
   }
 }
 
+int SMESH_Gen_i::GetCurrentStudyID()
+{
+  return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId();
+}
+    
 //=============================================================================
 /*! 
  *  SMESHEngine_factory
index 9ba9bdbb9e5a0d85c7a230ed0dc4111fbe886e02..0a6e010612ea4e19d56bcdb0ce3d3db204a52f37 100644 (file)
@@ -498,8 +498,7 @@ public:
   }
 
   // Get current study ID
-  int GetCurrentStudyID()
-  { return myCurrentStudy->_is_nil() ? -1 : myCurrentStudy->StudyId(); }
+  int GetCurrentStudyID();
 
   /*!
    * \brief Find SObject for an algo