Tidy up NodeNetworkInterface, replacing &[] root network arguments with methods for the document network (#2393)

* Replace `.selected_nodes(&[])` with `.selected_nodes_in_nested_network()` and `.selected_nodes()`

* Replace `.network(&[])` with `.document_network()` and `.nested_network()`

* Replace `.network_metadata(&[])` with `.document_network_metadata()`
This commit is contained in:
Keavon Chambers
2025-03-07 01:33:24 -08:00
committed by GitHub
parent 22a900b35e
commit c4cf47703a
28 changed files with 224 additions and 247 deletions
@@ -85,10 +85,7 @@ impl MessageHandler<DialogMessage, DialogMessageData<'_>> for DialogMessageHandl
.collect();
self.export_dialog.artboards = artboards;
self.export_dialog.has_selection = document
.network_interface
.selected_nodes(&[])
.is_some_and(|selected_nodes| selected_nodes.selected_layers(document.metadata()).next().is_some());
self.export_dialog.has_selection = document.network_interface.selected_nodes().selected_layers(document.metadata()).next().is_some();
self.export_dialog.send_dialog_to_frontend(responses);
}
}