mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Fix bug where nodes (like Text) with a non-visible primary input would gain a primary input when shaken (#3899)
* fix: Shaking a Text layer breaks its type signature * Add a second fix for the same issue --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
parent
b7a1b3e665
commit
bf486b4cb5
@@ -1521,10 +1521,9 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
|
||||
for input_index in 0..network_interface.number_of_inputs(selected_node, selection_network_path) {
|
||||
let input_connector = InputConnector::node(*selected_node, input_index);
|
||||
// Only disconnect inputs to non selected nodes
|
||||
if !network_interface
|
||||
if network_interface
|
||||
.upstream_output_connector(&input_connector, selection_network_path)
|
||||
.and_then(|connector| connector.node_id())
|
||||
.is_some_and(|node_id| all_selected_nodes.contains(&node_id))
|
||||
.is_some_and(|connector| connector.node_id().map_or(true, |node_id| !all_selected_nodes.contains(&node_id)))
|
||||
{
|
||||
responses.add(NodeGraphMessage::DisconnectInput { input_connector });
|
||||
}
|
||||
|
||||
@@ -4068,8 +4068,8 @@ impl NodeNetworkInterface {
|
||||
log::error!("Could not get current input in disconnect_input");
|
||||
return;
|
||||
};
|
||||
// Do not disconnect an already disconnected input
|
||||
if matches!(current_input, NodeInput::Value { .. }) {
|
||||
// Only disconnect inputs that are actual wire connections (Node or Import)
|
||||
if !matches!(current_input, NodeInput::Node { .. } | NodeInput::Import { .. }) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user