From: jfa Date: Mon, 26 Nov 2007 14:02:00 +0000 (+0000) Subject: Fix bug 17903: Problem with closing studies. X-Git-Tag: V3_2_9rc2~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1ee07099ad0aea2406c68234d34898799536ca39;p=modules%2Fsmesh.git Fix bug 17903: Problem with closing studies. --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 522732e50..e343bea5a 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -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() ) {