mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 04:58:12 +08:00
Do not transform layers when transforming a parent folder (#481)
* Modify all message enum data to use named struct values, not tuples (#479) * Massively reorganize and clean up the whole Rust codebase * Modify all message enum data to use named struct values, not tuples * Do not transform layers when transforming parent * Reduce complexity to O(nlogn) * Add TODO comment about performance Co-authored-by: Keavon Chambers <keavon@keavon.com> Co-authored-by: Dennis <dennis@kobert.dev>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
Dennis
parent
bd3191f16e
commit
adcd7cd9a3
@@ -114,11 +114,11 @@ impl Document {
|
||||
|
||||
// Return returns all folders that are not contained in any other of the given folders
|
||||
pub fn shallowest_folders<'a>(&'a self, layers: impl Iterator<Item = &'a [LayerId]>) -> Vec<&[LayerId]> {
|
||||
self.shallowest_unique_layers(self.folders(layers))
|
||||
Self::shallowest_unique_layers(self.folders(layers))
|
||||
}
|
||||
|
||||
// Return returns all layers that are not contained in any other of the given folders
|
||||
pub fn shallowest_unique_layers<'a>(&'a self, layers: impl Iterator<Item = &'a [LayerId]>) -> Vec<&[LayerId]> {
|
||||
pub fn shallowest_unique_layers<'a>(layers: impl Iterator<Item = &'a [LayerId]>) -> Vec<&'a [LayerId]> {
|
||||
let mut sorted_layers: Vec<_> = layers.collect();
|
||||
sorted_layers.sort();
|
||||
// Sorting here creates groups of similar UUID paths
|
||||
|
||||
Reference in New Issue
Block a user