From: asl Date: Fri, 24 Mar 2006 10:29:08 +0000 (+0000) Subject: PAL10439 - invalid references must be deleted in VISU X-Git-Tag: mergeto_OCC_debug_for_3_2_0b1_07Apr06~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a11b533cd3d74671e31381f8fab559f5d6b046be;p=modules%2Fvisu.git PAL10439 - invalid references must be deleted in VISU --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index a03b12e8..0ac4663d 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -437,11 +437,18 @@ CreateCurves( SalomeApp_Module* theModule, _PTR(ChildIterator) aIter = aStudy->NewChildIterator(aSObject); for (; aIter->More(); aIter->Next()) { _PTR(SObject) aTblObj = aIter->Value(); - if ( aTblObj ) { + if( aTblObj ) { _PTR(GenericAttribute) anAttr; if (aTblObj->FindAttribute( anAttr, "AttributeName" ) ) { + + _PTR(ChildIterator) aChildIter = aStudy->NewChildIterator( aTblObj ); + SalomeApp_Study* salome_study = GetAppStudy( theModule ); + for( aChildIter->InitEx( false ); aChildIter->More(); aChildIter->Next() ) + salome_study->deleteReferencesTo( aChildIter->Value() ); + aBuilder->RemoveObjectWithChildren( aTblObj ); // We should have only one child - UpdateObjBrowser(theModule,true,aTblObj); + + //UpdateObjBrowser(theModule,true,aTblObj); break; } }