mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 19:08:12 +08:00
Fix the Path tool erroneously showing editable geometry overlays belonging to hidden Path nodes (#2932)
* Ignore hidden path nodes * Use correct path node vector modification * Break test * Better fix for test * Fix rustfmt --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
c42011f8e2
commit
1e3c3da3fe
@@ -90,7 +90,7 @@ impl DocumentMetadata {
|
||||
|
||||
let mut use_local = true;
|
||||
let graph_layer = graph_modification_utils::NodeGraphLayer::new(layer, network_interface);
|
||||
if let Some(path_node) = graph_layer.upstream_node_id_from_name("Path") {
|
||||
if let Some(path_node) = graph_layer.upstream_visible_node_id_from_name_in_layer("Path") {
|
||||
if let Some(&source) = self.first_instance_source_ids.get(&layer.to_node()) {
|
||||
if !network_interface
|
||||
.upstream_flow_back_from_nodes(vec![path_node], &[], FlowType::HorizontalFlow)
|
||||
|
||||
@@ -3445,12 +3445,17 @@ impl NodeNetworkInterface {
|
||||
pub fn compute_modified_vector(&self, layer: LayerNodeIdentifier) -> Option<VectorData> {
|
||||
let graph_layer = graph_modification_utils::NodeGraphLayer::new(layer, self);
|
||||
|
||||
if let Some(vector_data) = graph_layer.upstream_node_id_from_name("Path").and_then(|node| self.document_metadata.vector_modify.get(&node)) {
|
||||
let mut modified = vector_data.clone();
|
||||
if let Some(TaggedValue::VectorModification(modification)) = graph_layer.find_input("Path", 1) {
|
||||
modification.apply(&mut modified);
|
||||
if let Some(path_node) = graph_layer.upstream_visible_node_id_from_name_in_layer("Path") {
|
||||
if let Some(vector_data) = self.document_metadata.vector_modify.get(&path_node) {
|
||||
let mut modified = vector_data.clone();
|
||||
|
||||
let path_node = self.document_network().nodes.get(&path_node);
|
||||
let modification_input = path_node.and_then(|node: &DocumentNode| node.inputs.get(1)).and_then(|input| input.as_value());
|
||||
if let Some(TaggedValue::VectorModification(modification)) = modification_input {
|
||||
modification.apply(&mut modified);
|
||||
}
|
||||
return Some(modified);
|
||||
}
|
||||
return Some(modified);
|
||||
}
|
||||
|
||||
self.document_metadata
|
||||
|
||||
Reference in New Issue
Block a user