From aa36eeade70bdc1891df1ce469251e6c02789192 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 13 Aug 2013 10:56:50 +0000 Subject: [PATCH] Compatibility with old SALOME studies --- src/GEOM_I/GEOM_Gen_i.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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() ); } } -- 2.30.2