Fix holding Ctrl in the graph not allowing for selecting nodes unless some are in a layer (#3778)

* Fix

* Fix-2

* Formatting

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Kulcode
2026-02-17 20:20:57 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 3b1a51b393
commit 2fe0cf7a4c
2 changed files with 3 additions and 11 deletions
@@ -1977,16 +1977,8 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
}
if control {
let mut non_layer_nodes = HashSet::new();
let layer_nodes = nodes.iter().filter(|node_id| network_interface.is_layer(node_id, selection_network_path));
for &layer_id in layer_nodes {
for child_id in network_interface.upstream_flow_back_from_nodes(vec![layer_id], selection_network_path, FlowType::LayerChildrenUpstreamFlow) {
if nodes.contains(&child_id) && child_id != layer_id {
non_layer_nodes.insert(child_id);
}
}
}
let layer_nodes: HashSet<_> = nodes.iter().filter(|node_id| network_interface.is_layer(node_id, selection_network_path)).cloned().collect();
let non_layer_nodes: HashSet<_> = nodes.difference(&layer_nodes).cloned().collect();
// Remove non-layer nodes from selection
if alt {