File tree Expand file tree Collapse file tree
portfolio/document/utility_types
tool/common_functionality Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ impl DocumentMetadata {
9090
9191 let mut use_local = true ;
9292 let graph_layer = graph_modification_utils:: NodeGraphLayer :: new ( layer, network_interface) ;
93- if let Some ( path_node) = graph_layer. upstream_node_id_from_name ( "Path" ) {
93+ if let Some ( path_node) = graph_layer. upstream_visible_node_id_from_name ( "Path" ) {
9494 if let Some ( & source) = self . first_instance_source_ids . get ( & layer. to_node ( ) ) {
9595 if !network_interface
9696 . upstream_flow_back_from_nodes ( vec ! [ path_node] , & [ ] , FlowType :: HorizontalFlow )
Original file line number Diff line number Diff line change @@ -3445,7 +3445,7 @@ impl NodeNetworkInterface {
34453445 pub fn compute_modified_vector ( & self , layer : LayerNodeIdentifier ) -> Option < VectorData > {
34463446 let graph_layer = graph_modification_utils:: NodeGraphLayer :: new ( layer, self ) ;
34473447
3448- if let Some ( vector_data) = graph_layer. upstream_node_id_from_name ( "Path" ) . and_then ( |node| self . document_metadata . vector_modify . get ( & node) ) {
3448+ if let Some ( vector_data) = graph_layer. upstream_visible_node_id_from_name ( "Path" ) . and_then ( |node| self . document_metadata . vector_modify . get ( & node) ) {
34493449 let mut modified = vector_data. clone ( ) ;
34503450 if let Some ( TaggedValue :: VectorModification ( modification) ) = graph_layer. find_input ( "Path" , 1 ) {
34513451 modification. apply ( & mut modified) ;
Original file line number Diff line number Diff line change @@ -424,6 +424,13 @@ impl<'a> NodeGraphLayer<'a> {
424424 . find ( |node_id| self . network_interface . reference ( node_id, & [ ] ) . is_some_and ( |reference| * reference == Some ( node_name. to_string ( ) ) ) )
425425 }
426426
427+ /// Node id of a visible node if it exists in the layer's primary flow
428+ pub fn upstream_visible_node_id_from_name ( & self , node_name : & str ) -> Option < NodeId > {
429+ self . horizontal_layer_flow ( )
430+ . filter ( |node_id| self . network_interface . is_visible ( node_id, & [ ] ) )
431+ . find ( |node_id| self . network_interface . reference ( node_id, & [ ] ) . is_some_and ( |reference| * reference == Some ( node_name. to_string ( ) ) ) )
432+ }
433+
427434 /// Node id of a protonode if it exists in the layer's primary flow
428435 pub fn upstream_node_id_from_protonode ( & self , protonode_identifier : ProtoNodeIdentifier ) -> Option < NodeId > {
429436 self . horizontal_layer_flow ( )
You can’t perform that action at this time.
0 commit comments