From 12896a2407149dd91227896d195618894b22737c Mon Sep 17 00:00:00 2001 From: Boyu Dai <70312141+Daniel53245@users.noreply.github.com> Date: Wed, 30 Apr 2025 14:22:17 +1000 Subject: [PATCH] Fix node deletion being too greedy (#2619) fix too greedy node deletion search Co-authored-by: CaligulaAlucard Co-authored-by: Keavon Chambers --- .../portfolio/document/utility_types/network_interface.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/src/messages/portfolio/document/utility_types/network_interface.rs b/editor/src/messages/portfolio/document/utility_types/network_interface.rs index f100da0c..70541b6c 100644 --- a/editor/src/messages/portfolio/document/utility_types/network_interface.rs +++ b/editor/src/messages/portfolio/document/utility_types/network_interface.rs @@ -4200,7 +4200,8 @@ impl NodeNetworkInterface { if let InputConnector::Node { node_id: downstream_id, .. } = downstream_node { let downstream_node_output = OutputConnector::node(*downstream_id, 0); if !delete_nodes.contains(downstream_id) { - stack.push(downstream_node_output); + can_delete = false; + break; } // Continue traversing over the downstream sibling, if the current node is a sibling to a node that will be deleted and it is a layer else {