mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 07:28:11 +08:00
WIP fix of folder crash / indent
This commit is contained in:
@@ -102,7 +102,7 @@ impl Folder {
|
||||
}
|
||||
|
||||
pub fn position_of_layer(&self, layer_id: LayerId) -> Result<usize, DocumentError> {
|
||||
self.layer_ids.iter().position(|x| *x == layer_id).ok_or(DocumentError::LayerNotFound)
|
||||
self.layer_ids.iter().position(|x| *x == layer_id).ok_or_else(|| DocumentError::LayerNotFound([layer_id].into()))
|
||||
}
|
||||
|
||||
pub fn folder(&self, id: LayerId) -> Option<&Folder> {
|
||||
|
||||
Reference in New Issue
Block a user