mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 01:40:32 +05:00
Avoid synchronization with geom groups when closing a study
+ void setCurrentStudy( SALOMEDS::Study_ptr theStudy, + bool theStudyIsBeingClosed=false);
This commit is contained in:
parent
aad57bda9f
commit
16f4d26534
@ -591,6 +591,12 @@ CORBA::Boolean SMESH_Gen_i::IsEmbeddedMode()
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy )
|
||||
{
|
||||
setCurrentStudy( theStudy );
|
||||
}
|
||||
|
||||
void SMESH_Gen_i::setCurrentStudy( SALOMEDS::Study_ptr theStudy,
|
||||
bool theStudyIsBeingClosed)
|
||||
{
|
||||
int curStudyId = GetCurrentStudyID();
|
||||
myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy );
|
||||
@ -601,7 +607,7 @@ void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy )
|
||||
}
|
||||
|
||||
// myCurrentStudy may be nil
|
||||
if ( !CORBA::is_nil( myCurrentStudy ) ) {
|
||||
if ( !theStudyIsBeingClosed && !CORBA::is_nil( myCurrentStudy ) ) {
|
||||
SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
|
||||
if( !myCurrentStudy->FindComponent( "GEOM" )->_is_nil() )
|
||||
aStudyBuilder->LoadWith( myCurrentStudy->FindComponent( "GEOM" ), GetGeomEngine() );
|
||||
@ -4688,7 +4694,7 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
|
||||
// set correct current study
|
||||
SALOMEDS::Study_var study = theComponent->GetStudy();
|
||||
if ( study->StudyId() != GetCurrentStudyID())
|
||||
SetCurrentStudy( study );
|
||||
setCurrentStudy( study, /*IsBeingClosed=*/true );
|
||||
|
||||
// Clear study contexts data
|
||||
int studyId = GetCurrentStudyID();
|
||||
|
@ -578,6 +578,9 @@ private:
|
||||
const char* theCommandNameForPython,
|
||||
const char* theFileNameForPython);
|
||||
|
||||
void setCurrentStudy( SALOMEDS::Study_ptr theStudy,
|
||||
bool theStudyIsBeingClosed=false);
|
||||
|
||||
private:
|
||||
static GEOM::GEOM_Gen_var myGeomGen;
|
||||
static CORBA::ORB_var myOrb; // ORB reference
|
||||
|
Loading…
Reference in New Issue
Block a user