remove connections more thoroughly on delete

This commit is contained in:
Lera Elvoé 2023-12-04 16:58:36 +03:00
parent 2e701de286
commit dfbb5f10cd
No known key found for this signature in database

View file

@ -167,11 +167,13 @@ func remove_outgoing_connection(from_port: int, to_node: String, to_port: int) -
return
var ports: Array = connections.get(to_node, []) as Array
if ports.is_empty():
return
ports.erase(to_port)
if ports.is_empty():
(outgoing_connections[from_port] as Dictionary).erase(to_node)
if (outgoing_connections[from_port] as Dictionary).is_empty():
outgoing_connections.erase(from_port)
outgoing_connection_removed.emit(from_port)