mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-13 21:52:59 +00:00
Apply review fixes
- crates/engine/src/cmd/arrange.rs
This commit is contained in:
1 parent
de5398cfc5
commit
cdca5bd09d
1 file changed
+2
-1
@@ -385,10 +385,11 @@ fn ungroup(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
};
|
||||
let freed_ids: Vec<ShapeId> = freed.iter().map(|c| c.id).collect();
|
||||
siblings.splice(at..=at, freed);
|
||||
// Ungrouped along with its outer group, it was listed among that group's children.
|
||||
// Ungrouped along with an outer group, it was listed among that group's children (once per expanded ancestor).
|
||||
match new_sel.iter().position(|x| x == id) {
|
||||
Some(i) => {
|
||||
new_sel.splice(i..=i, freed_ids);
|
||||
new_sel.retain(|x| x != id);
|
||||
}
|
||||
None => new_sel.extend(freed_ids),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user