This repository was archived by the owner on Sep 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -266,10 +266,13 @@ def redo_(self):
266266
267267 # create components
268268 self .create_drawings ()
269- nodes = self .flow ._create_nodes_from_data (self .data ['nodes' ])
270- self .pasted_components ['nodes' ] = nodes
271- connections = self .flow ._connect_nodes_from_data (nodes , self .data ['connections' ])
272- self .pasted_components ['connections' ] = connections
269+
270+ self .pasted_components ['nodes' ], self .pasted_components ['connections' ] = \
271+ self .flow .load_components (
272+ nodes_data = self .data ['nodes' ],
273+ conns_data = self .data ['connections' ],
274+ output_data = self .data ['output data' ],
275+ )
273276
274277 self .select_new_components_in_view ()
275278 else :
Original file line number Diff line number Diff line change @@ -1120,6 +1120,7 @@ def _copy(self): # ctrl+c
11201120 data = {
11211121 'nodes' : self ._get_nodes_data (self .selected_nodes ()),
11221122 'connections' : self ._get_connections_data (self .selected_nodes ()),
1123+ 'output data' : self ._get_output_data (self .selected_nodes ()),
11231124 'drawings' : self ._get_drawings_data (self .selected_drawings ())
11241125 }
11251126 QGuiApplication .clipboard ().setText (json .dumps (data ))
@@ -1189,10 +1190,14 @@ def _get_nodes_data(self, nodes):
11891190
11901191 def _get_connections_data (self , nodes ):
11911192 """generates the connections data for connections between a specified list of nodes"""
1192-
11931193 f_complete_data = self .session_gui .core_session .complete_data
11941194 return f_complete_data (self .flow ._gen_conns_data (nodes ))
11951195
1196+ def _get_output_data (self , nodes ):
1197+ """generates the serialized data of output ports of the specified nodes"""
1198+ f_complete_data = self .session_gui .core_session .complete_data
1199+ return f_complete_data (self .flow ._gen_output_data (nodes ))
1200+
11961201 def _get_drawings_data (self , drawings ):
11971202 """generates the data for a list of drawings"""
11981203
You can’t perform that action at this time.
0 commit comments