mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 06:58:11 +08:00
Known cases of crash / incorrect behavior resolved
This commit is contained in:
@@ -95,7 +95,7 @@ impl Document {
|
||||
self.folder_mut(path)?.layer_mut(id).ok_or_else(|| DocumentError::LayerNotFound(path.into()))
|
||||
}
|
||||
|
||||
pub fn deepest_common_folder<'a>(&self, layers: impl Iterator<Item = &'a [LayerId]>) -> Result<&'a [LayerId], DocumentError> {
|
||||
pub fn shallowest_common_folder<'a>(&self, layers: impl Iterator<Item = &'a [LayerId]>) -> Result<&'a [LayerId], DocumentError> {
|
||||
let common_prefix_of_path = self.common_layer_path_prefix(layers);
|
||||
|
||||
Ok(match self.layer(common_prefix_of_path)?.data {
|
||||
@@ -546,7 +546,6 @@ impl Document {
|
||||
Some(vec![LayerChanged { path: path.clone() }])
|
||||
}
|
||||
Operation::CreateFolder { path } => {
|
||||
log::debug!("Creating a folder with path {:?}", path);
|
||||
self.set_layer(path, Layer::new(LayerDataType::Folder(Folder::default()), DAffine2::IDENTITY.to_cols_array()), -1)?;
|
||||
self.mark_as_dirty(path)?;
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ impl Folder {
|
||||
}
|
||||
|
||||
pub fn folder_contains(&self, id: LayerId) -> bool {
|
||||
log::debug!("For {:?} Folder does contain {:?}", id, self.layer_ids.contains(&id));
|
||||
self.layer_ids.contains(&id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user