@@ -444,6 +444,7 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
444
444
DocumentMessage :: EnterNestedNetwork { node_id } => {
445
445
self . breadcrumb_network_path . push ( node_id) ;
446
446
self . selection_network_path . clone_from ( & self . breadcrumb_network_path ) ;
447
+ responses. add ( NodeGraphMessage :: UnloadWires ) ;
447
448
responses. add ( NodeGraphMessage :: SendGraph ) ;
448
449
responses. add ( DocumentMessage :: ZoomCanvasToFitAll ) ;
449
450
responses. add ( NodeGraphMessage :: SetGridAlignedEdges ) ;
@@ -473,9 +474,10 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
473
474
self . breadcrumb_network_path . pop ( ) ;
474
475
self . selection_network_path . clone_from ( & self . breadcrumb_network_path ) ;
475
476
}
477
+ responses. add ( NodeGraphMessage :: UnloadWires ) ;
478
+ responses. add ( NodeGraphMessage :: SendGraph ) ;
476
479
responses. add ( DocumentMessage :: PTZUpdate ) ;
477
480
responses. add ( NodeGraphMessage :: SetGridAlignedEdges ) ;
478
- responses. add ( NodeGraphMessage :: SendGraph ) ;
479
481
}
480
482
DocumentMessage :: FlipSelectedLayers { flip_axis } => {
481
483
let scale = match flip_axis {
@@ -525,6 +527,7 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
525
527
}
526
528
}
527
529
DocumentMessage :: GraphViewOverlay { open } => {
530
+ let opened = !self . graph_view_overlay_open && open;
528
531
self . graph_view_overlay_open = open;
529
532
530
533
responses. add ( FrontendMessage :: UpdateGraphViewOverlay { open } ) ;
@@ -537,6 +540,9 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
537
540
538
541
responses. add ( DocumentMessage :: RenderRulers ) ;
539
542
responses. add ( DocumentMessage :: RenderScrollbars ) ;
543
+ if opened {
544
+ responses. add ( NodeGraphMessage :: UnloadWires ) ;
545
+ }
540
546
if open {
541
547
responses. add ( ToolMessage :: DeactivateTools ) ;
542
548
responses. add ( OverlaysMessage :: Draw ) ; // Clear the overlays
@@ -1878,6 +1884,7 @@ impl DocumentMessageHandler {
1878
1884
responses. add ( NodeGraphMessage :: SelectedNodesUpdated ) ;
1879
1885
responses. add ( NodeGraphMessage :: ForceRunDocumentGraph ) ;
1880
1886
// TODO: Remove once the footprint is used to load the imports/export distances from the edge
1887
+ responses. add ( NodeGraphMessage :: UnloadWires ) ;
1881
1888
responses. add ( NodeGraphMessage :: SetGridAlignedEdges ) ;
1882
1889
responses. add ( Message :: StartBuffer ) ;
1883
1890
Some ( previous_network)
@@ -1909,7 +1916,8 @@ impl DocumentMessageHandler {
1909
1916
responses. add ( PortfolioMessage :: UpdateOpenDocumentsList ) ;
1910
1917
responses. add ( NodeGraphMessage :: SelectedNodesUpdated ) ;
1911
1918
responses. add ( NodeGraphMessage :: ForceRunDocumentGraph ) ;
1912
-
1919
+ responses. add ( NodeGraphMessage :: UnloadWires ) ;
1920
+ responses. add ( NodeGraphMessage :: SendWires ) ;
1913
1921
Some ( previous_network)
1914
1922
}
1915
1923
@@ -2066,7 +2074,7 @@ impl DocumentMessageHandler {
2066
2074
/// Loads all of the fonts in the document.
2067
2075
pub fn load_layer_resources ( & self , responses : & mut VecDeque < Message > ) {
2068
2076
let mut fonts = HashSet :: new ( ) ;
2069
- for ( _node_id, node) in self . document_network ( ) . recursive_nodes ( ) {
2077
+ for ( _node_id, node, _ ) in self . document_network ( ) . recursive_nodes ( ) {
2070
2078
for input in & node. inputs {
2071
2079
if let Some ( TaggedValue :: Font ( font) ) = input. as_value ( ) {
2072
2080
fonts. insert ( font. clone ( ) ) ;
0 commit comments