mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-05 02:28:12 +08:00
Stop Ctrl+A from selecting artboards
This commit is contained in:
@@ -46,6 +46,10 @@ impl DocumentMetadata {
|
|||||||
self.root().decendants(self)
|
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> + '_ {
|
pub fn selected_layers(&self) -> impl Iterator<Item = LayerNodeIdentifier> + '_ {
|
||||||
self.all_layers().filter(|layer| self.selected_nodes.contains(&layer.to_node()))
|
self.all_layers().filter(|layer| self.selected_nodes.contains(&layer.to_node()))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ impl MessageHandler<DocumentMessage, DocumentInputs<'_>> for DocumentMessageHand
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
SelectAllLayers => {
|
SelectAllLayers => {
|
||||||
let all = self.metadata().all_layers().map(|layer| layer.to_node()).collect();
|
let all = self.metadata().all_layers_except_artboards().map(|layer| layer.to_node()).collect();
|
||||||
responses.add(NodeGraphMessage::SelectedNodesSet { nodes: all });
|
responses.add(NodeGraphMessage::SelectedNodesSet { nodes: all });
|
||||||
}
|
}
|
||||||
SelectedLayersLower => {
|
SelectedLayersLower => {
|
||||||
|
|||||||
Reference in New Issue
Block a user