From: asl Date: Wed, 9 Nov 2005 06:48:58 +0000 (+0000) Subject: PAL10343 - it is impossible to select shape in "create mesh" dialog X-Git-Tag: V3_1_0a3~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ab4288fb65ac5324117872ca0425e0200b6fd7e0;p=modules%2Fsmesh.git PAL10343 - it is impossible to select shape in "create mesh" dialog --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 77abfc9e5..3d36ed342 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -410,7 +410,8 @@ GEOM_Client* SMESH_Gen_i::GetShapeReader() void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy ) { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::SetCurrentStudy" ); + //if(MYDEBUG) + MESSAGE( "SMESH_Gen_i::SetCurrentStudy" ); myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy ); // create study context, if it doesn't exist and set current study int studyId = GetCurrentStudyID(); @@ -418,11 +419,13 @@ void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy ) if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) { myStudyContextMap[ studyId ] = new StudyContext; } + + SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + aStudyBuilder->LoadWith( myCurrentStudy->FindComponent( "GEOM" ), GetGeomEngine() ); + // set current study for geom engine - /* - if ( !CORBA::is_nil( GetGeomEngine() ) ) - GetGeomEngine()->GetCurrentStudy( myCurrentStudy->StudyId() ); - */ + //if ( !CORBA::is_nil( GetGeomEngine() ) ) + // GetGeomEngine()->GetCurrentStudy( myCurrentStudy->StudyId() ); } //============================================================================= @@ -1657,6 +1660,13 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, theComponent->GetStudy()->StudyId() != myCurrentStudy->StudyId() ) SetCurrentStudy( theComponent->GetStudy() ); +/* if( !theComponent->_is_nil() ) + { + //SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( theComponent->GetStudy() ); + if( !myCurrentStudy->FindComponent( "GEOM" )->_is_nil() ) + loadGeomData( myCurrentStudy->FindComponent( "GEOM" ) ); + }*/ + StudyContext* myStudyContext = GetCurrentStudyContext(); // Get temporary files location @@ -1961,7 +1971,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, SALOMEDS::SObject_var shapeSO = myCurrentStudy->FindObjectID( refFromFile ); // Make sure GEOM data are loaded first - loadGeomData( shapeSO->GetFatherComponent() ); + //loadGeomData( shapeSO->GetFatherComponent() ); CORBA::Object_var shapeObject = SObjectToObject( shapeSO ); if ( !CORBA::is_nil( shapeObject ) ) {