From: jfa Date: Mon, 26 Nov 2007 14:01:25 +0000 (+0000) Subject: Fix bug 17903: Problem with closing studies. X-Git-Tag: V4_1_0rc2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=8b495b9b50543fe0e72ff5a402f47f3666b2a04f 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 6f413a322..92cdd2b80 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -3593,6 +3593,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() ) {