mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
fix grouping nodes not removing incoming connections (#6)
Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/6 Co-authored-by: Lera Elvoé <yagich@poto.cafe> Co-committed-by: Lera Elvoé <yagich@poto.cafe>
This commit is contained in:
parent
b36bdaf71c
commit
1fb71617bb
2 changed files with 16 additions and 11 deletions
|
@ -158,6 +158,11 @@ func group_nodes(nodes_to_group: Array) -> Deck:
|
||||||
if !(connection.keys()[0] in node_ids_to_keep):
|
if !(connection.keys()[0] in node_ids_to_keep):
|
||||||
disconnect_nodes(node, get_node(connection.keys()[0]), from_port, connection.values()[0])
|
disconnect_nodes(node, get_node(connection.keys()[0]), from_port, connection.values()[0])
|
||||||
|
|
||||||
|
for to_port: int in node.incoming_connections:
|
||||||
|
for from_node: String in node.incoming_connections[to_port]:
|
||||||
|
if !(from_node in node_ids_to_keep):
|
||||||
|
disconnect_nodes(get_node(from_node), node, node.incoming_connections[to_port].values()[0], to_port)
|
||||||
|
|
||||||
midpoint += node.position_as_vector2()
|
midpoint += node.position_as_vector2()
|
||||||
remove_node(node._id)
|
remove_node(node._id)
|
||||||
group.add_node_inst(node, node._id)
|
group.add_node_inst(node, node._id)
|
||||||
|
|
Loading…
Reference in a new issue