Fix problem in Mesh module on closing study operation (reference to the non existent study is kept and used)

This commit is contained in:
vsr 2009-09-29 14:11:58 +00:00
parent 49644451f1
commit 3fa4acc3ab
2 changed files with 7 additions and 2 deletions

View File

@ -4195,6 +4195,7 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
// context->myDocument = 0; // context->myDocument = 0;
// } // }
myCurrentStudy = SALOMEDS::Study::_nil();
return; 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 * SMESHEngine_factory

View File

@ -498,8 +498,7 @@ public:
} }
// Get current study ID // Get current study ID
int GetCurrentStudyID() int GetCurrentStudyID();
{ return myCurrentStudy->_is_nil() ? -1 : myCurrentStudy->StudyId(); }
/*! /*!
* \brief Find SObject for an algo * \brief Find SObject for an algo