From: vsr Date: Tue, 13 Aug 2013 10:56:50 +0000 (+0000) Subject: Compatibility with old SALOME studies X-Git-Tag: BR_hydro_v_0_3_1~145 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa36eeade70bdc1891df1ce469251e6c02789192;p=modules%2Fgeom.git Compatibility with old SALOME studies --- diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 75e177984..3026120cc 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -595,8 +595,11 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, if ( !useCaseBuilder->IsUseCaseNode( theComponent ) ) { useCaseBuilder->SetRootCurrent(); useCaseBuilder->Append( theComponent ); // component object is added as the top level item - SALOMEDS::ChildIterator_wrap it = study->NewChildIterator( theComponent ); - for (it->InitEx(true); it->More(); it->Next()) { + } + + SALOMEDS::ChildIterator_wrap it = study->NewChildIterator( theComponent ); + for ( it->InitEx(true); it->More(); it->Next() ) { + if ( !useCaseBuilder->IsUseCaseNode( it->Value() ) ) { useCaseBuilder->AppendTo( it->Value()->GetFather(), it->Value() ); } }