]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/WorkspaceIO.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / WorkspaceIO.cxx
index 029ade420b79aa60ce57a8ca49fc491d16a5783e..9a019ebafe4643b68295cd0cea2c92a0ee8bb88a 100644 (file)
@@ -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