X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_LayerDistribution_i.cxx;fp=src%2FStdMeshers_I%2FStdMeshers_LayerDistribution_i.cxx;h=abe9066df65adf24ddf918f3281f4a241906babe;hp=d8bb021801de5bdee13585d8c2b7e53b3632aec9;hb=b7a7d49664daa32e1befb558280e13ed0bde37c9;hpb=e7811c61c3565ada368be484f20e7fcac4a9f2cb diff --git a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx index d8bb02180..abe9066df 100644 --- a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx @@ -45,13 +45,11 @@ using namespace std; //============================================================================= StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } @@ -90,11 +88,10 @@ void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesi // Remove SO of 1D hypothesis if it was published if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - SALOMEDS::SObject_var SO = gen->ObjectToSObject( study, hyp1D ); + SALOMEDS::SObject_var SO = gen->ObjectToSObject( hyp1D ); if ( ! SO->_is_nil() ) { - SALOMEDS::StudyBuilder_var builder = study->NewBuilder(); + SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder(); builder->RemoveObjectWithChildren( SO ); SO->UnRegister(); } @@ -198,8 +195,7 @@ void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream ) is >> libName ) { SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var curStudy = gen->GetCurrentStudy(); - gen->SetCurrentStudy( SALOMEDS::Study::_nil() ); // prevent hypo publishing + gen->SetEnablePublish( false ); // prevent hypo publishing try { SMESH::SMESH_Hypothesis_var hyp1D = @@ -221,7 +217,7 @@ void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream ) } catch (...) { } - gen->SetCurrentStudy( curStudy ); // enable hypo publishing + gen->SetEnablePublish( true ); // enable hypo publishing } }