Salome HOME
Debug of KindOfPort
[modules/superv.git] / src / GraphBase / DataFlowBase_OutPort.cxx
index f25acadf509af5ab7fa97755d843307429215b70..d03f937aa6eb42ac52f5600151d2084db1d39b18 100644 (file)
@@ -103,17 +103,21 @@ bool GraphBase::OutPort::RemoveInPort() {
   }
   int index = 1 ;
   GraphBase::InPort * toPort = _InPorts[ index - 1 ] ;
-  cdebug << "OutPort::RemoveInPort " << NodeName() << "( " << PortName() << " " << PortStatus() << " ) --> "
-         << toPort->NodeName() << "( " << toPort->PortName() << " " << toPort->PortStatus()
-         << " )" << endl ;
   _InPortsSize -= 1 ;
   _InPorts.resize( _InPortsSize ) ;
   _Links.resize( _InPortsSize ) ;
   _MapOfInPorts.erase( toPort->NodePortName() ) ;
   if ( _InPortsSize == 0 ) {
     PortStatus(NotConnected ) ;
+    if ( IsSwitch() ) {
+      Kind( SUPERV::InLineParameter ) ;
+    }
   }
   toPort->RemoveOutPort() ;
+  cdebug << "OutPort::RemoveInPort " << NodeName() << "( " << PortName() << " " << PortStatus()
+         << " " << Kind() << " ) _InPortsSize " << _InPortsSize << " --> "
+         << toPort->NodeName() << "( " << toPort->PortName() << " " << toPort->PortStatus()
+         << " " << toPort->Kind() << " )" << endl ;
   return true ;
 }
 
@@ -138,6 +142,9 @@ bool GraphBase::OutPort::RemoveInPort( GraphBase::InPort * toPort ) {
   _MapOfInPorts.erase( toPort->NodePortName() ) ;
   if ( _InPortsSize == 0 ) {
     PortStatus(NotConnected ) ;
+    if ( IsSwitch() ) {
+      Kind( SUPERV::InLineParameter ) ;
+    }
   }
   toPort->RemoveOutPort() ;
   return true ;
@@ -147,7 +154,7 @@ bool GraphBase::OutPort::ReNameInPort( const char* OldNodePortName ,
                                        const char* NewNodePortName ) {
   int index = _MapOfInPorts[ OldNodePortName ] ;
   if ( index <= 0 || index > _InPortsSize ) {
-    cdebug << "GraphBase::OutPort::ReNameLink Error " << OldNodePortName
+    cdebug << "GraphBase::OutPort::ReNameInPort Error " << OldNodePortName
            << " --> " << NewNodePortName << " index " << index << endl ;
     return false ;
   }