Salome HOME
Modifications to avoid set wrong value to input port after deletion its link
authormkr <mkr@opencascade.com>
Mon, 24 Oct 2005 14:55:53 +0000 (14:55 +0000)
committermkr <mkr@opencascade.com>
Mon, 24 Oct 2005 14:55:53 +0000 (14:55 +0000)
(in this case input port must have "Unknown CORBA::Any Type" value).

src/GraphBase/DataFlowBase_Graph.cxx

index 11f2cdf3da445e5301aa8c8b68f3618bd0d18ee8..606ee89666e0d5a0ee46628d43ca8575fb2b3d0a 100644 (file)
@@ -1570,11 +1570,15 @@ bool GraphBase::Graph::AddInputData( const char* ToNodeName ,
   bool RetVal = false ;
   cdebug_in << "GraphBase::Graph::AddInputData(" << ToNodeName << ","
             << ToServiceParameterName << " , Any " ;
+  bool isUnknown = false;
   switch (aValue.type()->kind()) {
     case CORBA::tk_string:
       char * t;
       aValue >>= t;
       cdebug << t << " (string) " ;
+      if ( !strcmp( t, "Unknown CORBA::Any Type" ) ) 
+       // mkr : in this case port has no input value
+       isUnknown = true;
       break;
     case CORBA::tk_double:
       double d;
@@ -1636,7 +1640,8 @@ bool GraphBase::Graph::AddInputData( const char* ToNodeName ,
                       toNode , toPort ) ;
     if ( RetVal ) {
       fromDataNodePort->SetValue( aValue ) ;
-      fromDataNodePort->PortStatus( DataConnected ) ;
+      if ( !isUnknown ) 
+       fromDataNodePort->PortStatus( DataConnected ) ;
     }
   }
   else {