Salome HOME
Some calls to UnValid() was missing in case of editing of StreamGraphs, StreamLinks...
authorrahuel <rahuel@opencascade.com>
Wed, 19 May 2004 12:46:03 +0000 (12:46 +0000)
committerrahuel <rahuel@opencascade.com>
Wed, 19 May 2004 12:46:03 +0000 (12:46 +0000)
src/Supervision/CNode_Impl.cxx
src/Supervision/INode_Impl.cxx
src/Supervision/Link_Impl.cxx
src/Supervision/StreamGraph_Impl.cxx
src/Supervision/StreamLink_Impl.cxx
src/Supervision/StreamPort_Impl.cxx

index 2ee04195ff86032aa8d93e89c07d7a2670f7e046..452dff0e3357de1b60dabd4e33a612b57ba3506c 100644 (file)
@@ -179,7 +179,7 @@ bool CNode_Impl::Delete() {
   if ( _DataFlowEditor->IsEditing() ) {
     RetVal = _DataFlowEditor->RemoveNode( Name() ) ;
     if ( RetVal ) {
-      RetVal = _DataFlowEditor->IsValid() ;
+      RetVal = _DataFlowEditor->UnValid() ;
     }
   }
   endService( "CNode_Impl::Delete" );
@@ -594,6 +594,7 @@ SUPERV::Port_ptr CNode_Impl::Port( const char * ServiceParameterName ) {
   if ( !begin ) {
     endService( "CNode_Impl::Port" );
   }
+  DataFlowEditor()->UnValid() ;
   return SUPERV::Port::_duplicate( iobject ) ;
 }
 
@@ -687,6 +688,7 @@ SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName ,
     MESSAGE( "CNode_Impl::Input returns nil object _IsNode " << _IsNode << " sts " << sts << " anInPort "
              << anInPort ) ;
   }
+  DataFlowEditor()->UnValid() ;
   return SUPERV::Port::_duplicate( iobject ) ;
 }
 
index 9bda5bf95a52161f5dc552fa948597c76c08a98d..cd5e83ed06cad700b0cdeab06d09ed3cacc9aaaa 100644 (file)
@@ -144,7 +144,7 @@ bool INode_Impl::Delete() {
   if ( DataFlowEditor()->IsEditing() ) {
     RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
     if ( RetVal )
-      RetVal = DataFlowEditor()->IsValid() ;
+      RetVal = DataFlowEditor()->UnValid() ;
   }
 //  endService( "INode_Impl::Delete" );
   return RetVal ;
index 073d12f63d7a61ec02c89135eb8e67e8e323048f..9f9cb48fd1cb71994f6664f09d72825dac01d395 100644 (file)
@@ -114,6 +114,9 @@ bool Link_Impl::Delete() {
                                              _OutputParameterName ,
                                              _DataFlowNode->Name() ,
                                              _InputParameterName ) ;
+  if ( RetVal ) {
+    DataFlowEditor()->UnValid() ;
+  }
 //  endService( "Link_Impl::Delete" );
   return RetVal ;
 }
index 351f3a6c51c18b7754ae96816d63a92aa1ad7dd2..0319e26226f8d1b87a53bcb048b044bcbd0479c0 100644 (file)
@@ -111,6 +111,7 @@ SUPERV::StreamLink_ptr StreamGraph_Impl::StreamLink(  SUPERV::StreamPort_ptr Out
           CORBA::Object_var obj = _poa->id_to_reference(*id);
           iobject = SUPERV::StreamLink::_narrow(obj) ;
           anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate(iobject) ) ;
+          DataFlowEditor()->UnValid() ;
         }
       }
     }
@@ -322,7 +323,9 @@ bool StreamGraph_Impl::SetStreamParams( const long Timeout ,
                                         const SUPERV::KindOfDataStreamTrace DataStreamTrace ,
                                         const double  DeltaTime ) {
   bool sts = DataFlowEditor()->StreamGraph()->SetStreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
-  DataFlowEditor()->UnValid() ;
+  if ( sts ) {
+    DataFlowEditor()->UnValid() ;
+  }
   return sts ;
 }
 
index 6b5f3859656bf354e2780a976fffa182e4bcc2e2..b68f0e82a95c21db5ee8c472de817be5909e909f 100644 (file)
@@ -96,6 +96,9 @@ bool StreamLink_Impl::Delete() {
                                               OutputParameterName() ,
                                               DataFlowNode()->Name() ,
                                               InputParameterName() ) ;
+  if ( RetVal ) {
+    DataFlowEditor()->UnValid() ;
+  }
 //  endService( "StreamLink_Impl::Delete" );
   return RetVal ;
 }
index 3754ec430c7b5d032edc2b7cecf091fe7f6de59c..759a0cd10835348f9c358cf1ef37e7b941bb7f4f 100644 (file)
@@ -160,7 +160,6 @@ SUPERV::StreamLink_ptr StreamPort_Impl::StreamLink() {
              << iobject->InPort()->Node()->Name() << "( " << iobject->InPort()->Name() << " ) " ) ;
     endService( "StreamPort_Impl::StreamLink" ) ;
   }
-  DataFlowEditor()->UnValid() ;
   return SUPERV::StreamLink::_duplicate( iobject ) ;
 }
 
@@ -189,6 +188,7 @@ bool StreamPort_Impl::SetParams( const SUPERV::KindOfSchema aKindOfSchema ,
     if ( RetVal ) {
       MESSAGE( "OutStreamPort_Impl::SetParams( " << aKindOfSchema << " , " << aKindOfInterpolation
                << " , " << aKindOfExtrapolation << " ) SUCCESS " ) ;
+      DataFlowEditor()->UnValid() ;
     }
     else {
       MESSAGE( "OutStreamPort_Impl::SetParams( " << aKindOfSchema << " , " << aKindOfInterpolation
@@ -199,7 +199,6 @@ bool StreamPort_Impl::SetParams( const SUPERV::KindOfSchema aKindOfSchema ,
     MESSAGE( "OutStreamPort_Impl::SetParams( " << aKindOfSchema << " , " << aKindOfInterpolation
              << " , " << aKindOfExtrapolation << " ) ERROR : OutPort" ) ;
   }
-  DataFlowEditor()->UnValid() ;
 //  endService( "StreamPort_Impl::SetParams" );
   return RetVal ;
 }
@@ -232,12 +231,12 @@ bool StreamPort_Impl::SetNumberOfValues( const long aNumberOfValues ) {
   if ( !IsInput() ) {
     GraphBase::OutDataStreamPort * anOutStreamPort = (GraphBase::OutDataStreamPort * ) DataFlowPort() ;
     anOutStreamPort->NumberOfValues( aNumberOfValues ) ;
+    DataFlowEditor()->UnValid() ;
     RetVal = true ;
   }
   else {
     MESSAGE( "OutStreamPort_Impl::SetNumberOfValues( " << aNumberOfValues << " ) ERROR : InPort" ) ;
   }
-  DataFlowEditor()->UnValid() ;
 //  endService( "StreamPort_Impl::SetNumberOfValues" );
   return RetVal ;
 }