]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL10439 - invalid references must be deleted in VISU
authorasl <asl@opencascade.com>
Fri, 24 Mar 2006 10:29:08 +0000 (10:29 +0000)
committerasl <asl@opencascade.com>
Fri, 24 Mar 2006 10:29:08 +0000 (10:29 +0000)
src/VISUGUI/VisuGUI.cxx

index a03b12e81d20bb4036ad0c325b8ce19b460bdf26..0ac4663d6754f5a0691d46db18ed151efac010c2 100644 (file)
@@ -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;
         }
       }