mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 11:28:30 +08:00
committed by
Keavon Chambers
parent
1f1c307211
commit
87f65cd831
@@ -74,6 +74,10 @@ impl Folder {
|
||||
self.layers.as_slice()
|
||||
}
|
||||
|
||||
pub fn layers_mut(&mut self) -> &mut [Layer] {
|
||||
self.layers.as_mut_slice()
|
||||
}
|
||||
|
||||
pub fn layer(&self, id: LayerId) -> Option<&Layer> {
|
||||
let pos = self.layer_ids.iter().position(|x| *x == id)?;
|
||||
Some(&self.layers[pos])
|
||||
|
||||
Reference in New Issue
Block a user