]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix bug 17903: Problem with closing studies.
authorjfa <jfa@opencascade.com>
Mon, 26 Nov 2007 14:02:00 +0000 (14:02 +0000)
committerjfa <jfa@opencascade.com>
Mon, 26 Nov 2007 14:02:00 +0000 (14:02 +0000)
src/SMESH_I/SMESH_Gen_i.cxx

index 522732e50e80239d9924cb1c4a2360bc63875f35..e343bea5a5c51d1b14307f1725c80dd6da9903b0 100644 (file)
@@ -3358,6 +3358,10 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Close" );
 
+  // set correct current study
+  if (theComponent->GetStudy()->StudyId() != GetCurrentStudyID())
+    SetCurrentStudy(theComponent->GetStudy());
+
   // Clear study contexts data
   int studyId = GetCurrentStudyID();
   if ( myStudyContextMap.find( studyId ) != myStudyContextMap.end() ) {