Salome HOME
PAL8521
[modules/superv.git] / src / Supervision / LNode_Impl.cxx
index d258747ee96bfcd54411c817827bd8e7782c9cd6..00d18232c43c44682c245248a4767abbf9c7cea4 100644 (file)
@@ -86,10 +86,15 @@ void LNode_Impl::destroy() {
       delete(_id) ;
       _thisObj->_remove_ref();
     }
+    else {
+      MESSAGE("LNode_Impl::destroy ERROR ") ;
+    }
     if ( !CORBA::is_nil( aCoupled ) ) {
-      aCoupled->SetCoupled( "" ) ;
+//      aCoupled->SetCoupled( "" ) ; : Used in GraphBase::Graph::RemoveNode( EndLoopNode ) :
       aCoupled->destroy() ;
     }
+// Valid() only after deletion of the corresponding EndLoopNode :
+    DataFlowEditor()->UnValid() ;
   }
   endService( "LNode_Impl::Destroy" );
 }
@@ -100,9 +105,10 @@ bool LNode_Impl::Delete() {
   if ( DataFlowEditor()->IsEditing() ) {
     DeletePorts() ;
     RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
-    if ( RetVal ) {
-      RetVal = DataFlowEditor()->IsValid() ;
-    }
+// Valid() only after deletion of the corresponding EndLoopNode :
+//    if ( RetVal ) {
+//      RetVal = DataFlowEditor()->IsValid() ;
+//    }
   }
   endService( "LNode_Impl::Delete" );
   return RetVal ;