Stop Ctrl+A from selecting artboards

This commit is contained in:
Keavon Chambers
2023-12-06 14:39:43 -08:00
parent 01499de8e7
commit 165c747d62
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -46,6 +46,10 @@ impl DocumentMetadata {
self.root().decendants(self)
}
pub fn all_layers_except_artboards(&self) -> impl Iterator<Item = LayerNodeIdentifier> + '_ {
self.all_layers().filter(move |layer| !self.artboards.contains(layer))
}
pub fn selected_layers(&self) -> impl Iterator<Item = LayerNodeIdentifier> + '_ {
self.all_layers().filter(|layer| self.selected_nodes.contains(&layer.to_node()))
}