X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FWorkspaceIO.cxx;h=9a019ebafe4643b68295cd0cea2c92a0ee8bb88a;hb=db0a767418f78b371c1e4fb0db00e6b75df74ff3;hp=029ade420b79aa60ce57a8ca49fc491d16a5783e;hpb=49d2d7db538d60008b9a5701ea8f26bb19997a82;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/WorkspaceIO.cxx b/lib/cpPlugins/Interface/WorkspaceIO.cxx index 029ade4..9a019eb 100644 --- a/lib/cpPlugins/Interface/WorkspaceIO.cxx +++ b/lib/cpPlugins/Interface/WorkspaceIO.cxx @@ -235,21 +235,26 @@ Save( const std::string& fname ) const auto od = orig->GetOutput( *oIt ); for( auto iIt = inputs.begin( ); iIt != inputs.end( ); ++iIt ) { - auto id = dest->GetInput( *iIt ); - if( od != NULL && od == id ) + unsigned int nInputs = dest->GetInputSize( *iIt ); + for( unsigned int k = 0; k < nInputs; ++k ) { - tinyxml2::XMLElement* e_conn = doc->NewElement( "Connection" ); - tinyxml2::XMLElement* e_orig = doc->NewElement( "Origin" ); - tinyxml2::XMLElement* e_dest = doc->NewElement( "Destination" ); - e_orig->SetAttribute( "Filter", orig->GetName( ) ); - e_orig->SetAttribute( "Name", oIt->c_str( ) ); - e_dest->SetAttribute( "Filter", dest->GetName( ) ); - e_dest->SetAttribute( "Name", iIt->c_str( ) ); - e_conn->LinkEndChild( e_orig ); - e_conn->LinkEndChild( e_dest ); - root->LinkEndChild( e_conn ); - - } // fi + auto id = dest->GetInput( *iIt, k ); + if( od != NULL && od == id ) + { + tinyxml2::XMLElement* e_conn = doc->NewElement( "Connection" ); + tinyxml2::XMLElement* e_orig = doc->NewElement( "Origin" ); + tinyxml2::XMLElement* e_dest = doc->NewElement( "Destination" ); + e_orig->SetAttribute( "Filter", orig->GetName( ) ); + e_orig->SetAttribute( "Name", oIt->c_str( ) ); + e_dest->SetAttribute( "Filter", dest->GetName( ) ); + e_dest->SetAttribute( "Name", iIt->c_str( ) ); + e_conn->LinkEndChild( e_orig ); + e_conn->LinkEndChild( e_dest ); + root->LinkEndChild( e_conn ); + + } // fi + + } // rof } // rof