From dfbb5f10cdaddebbfa5dc325fe08a6c19fc6a3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Mon, 4 Dec 2023 16:58:36 +0300 Subject: [PATCH] remove connections more thoroughly on delete --- classes/deck/deck_node.gd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/deck/deck_node.gd b/classes/deck/deck_node.gd index e3176c0..e374bbd 100644 --- a/classes/deck/deck_node.gd +++ b/classes/deck/deck_node.gd @@ -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)