Salome HOME
SMH: 3.0.0 preparation = merged version (POLYWORK + RTVDEBUG01) + adopation for new GUI
[modules/superv.git] / src / GraphBase / DataFlowBase_OutPort.cxx
index 61d6cfa9227830361f4faf7e54f4b9c06857980b..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 ;