From ea9563f1f550b941dcee76782d5d069030f6acaa Mon Sep 17 00:00:00 2001 From: rahuel Date: Wed, 12 May 2004 09:09:15 +0000 Subject: [PATCH] Restore of previous code and debug of StreamGraph informations in a FlowGraph. --- src/GraphBase/DataFlowBase_ComputingNode.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/GraphBase/DataFlowBase_ComputingNode.cxx b/src/GraphBase/DataFlowBase_ComputingNode.cxx index 7cf9bfa..4f04a80 100644 --- a/src/GraphBase/DataFlowBase_ComputingNode.cxx +++ b/src/GraphBase/DataFlowBase_ComputingNode.cxx @@ -552,7 +552,8 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf QString aKind ; // san - Presumably, data stream graphs should be always saved with kind = DataStreamGraph - if ( IsDataFlowNode() /*|| ( IsDataStreamNode() && HasDataStream() == 0 )*/ ) { +// JR : the bug was at line 566 : && HasDataStream() != 0 was missing + if ( IsDataFlowNode() || ( IsDataStreamNode() && HasDataStream() == 0 ) ) { aKind = aKind.setNum( SUPERV::DataFlowGraph ) ; } else { @@ -562,7 +563,7 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf node.appendChild( kind ) ; kind.appendChild( aField ) ; - if ( IsDataStreamNode() ) { + if ( IsDataStreamNode() && HasDataStream() != 0 ) { long Timeout ; SUPERV::KindOfDataStreamTrace DataStreamTrace ; double DeltaTime ; @@ -919,10 +920,11 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName , const ListOfPythonFunctions PythonFunctions , int XCoordinate , int YCoordinate ) const { // san - Presumably, data stream graphs should be always saved with kind = DataStreamGraph - if ( IsDataFlowNode() /*|| ( IsDataStreamNode() && HasDataStream() == 0 )*/ ) { +// JR : the bug was at line 927 : && HasDataStream() != 0 was missing + if ( IsDataFlowNode() || ( IsDataStreamNode() && HasDataStream() == 0 ) ) { f << Name() << " = Graph( '" << Name() << "' )" << endl ; } - else if ( IsDataStreamNode() ) { + else if ( IsDataStreamNode() && HasDataStream() != 0 ) { f << Name() << " = StreamGraph( '" << Name() << "' )" << endl ; long Timeout ; SUPERV::KindOfDataStreamTrace DataStreamTrace ; -- 2.39.2