Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit adeb719

Browse files
committed
fix copy and paste
1 parent 3572f6a commit adeb719

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

ryvencore_qt/src/flows/FlowCommands.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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:

ryvencore_qt/src/flows/FlowView.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)