mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 12:18:12 +08:00
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:
co-authored by
Keavon Chambers
parent
3b1a51b393
commit
2fe0cf7a4c
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user