mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
fix(transform): limit ancestor detachment to moving preview
This commit is contained in:
1 parent
37c21e1d77
commit
d53e14bccc
2 files changed
+7
-1
No files matched your search
@@ -170,6 +170,13 @@ impl Several {
|
||||
let mut d = live.clone();
|
||||
show_only(&mut d.layers, ids);
|
||||
for id in ids {
|
||||
if let Some(path) = d.path_of(*id) {
|
||||
for n in 1..path.len() {
|
||||
if let Some(ancestor) = path.get(..n).and_then(|p| d.layer_at_mut(p)) {
|
||||
ancestor.clipped = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(l) = d.layer_mut(*id) {
|
||||
l.clipped = false;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,6 @@ pub(super) fn show_only(layers: &mut [photocraft_doc::Layer], keep: &[LayerId])
|
||||
}
|
||||
match &mut l.content {
|
||||
LayerContent::Group(g) if g.children.iter().any(|c| keep.iter().any(|k| contains(c, *k))) => {
|
||||
l.clipped = false;
|
||||
// This ancestor only clips the covering children. Its background is already
|
||||
// on the base canvas; drawing it again would cover the moving layer in white.
|
||||
if let Some(board) = &mut g.artboard {
|
||||
|
||||
Reference in new issue
Block a user