From cdca5bd09de7d5a4c526afdf02f24c23e127348e Mon Sep 17 00:00:00 2001 From: aiongg <67543387+aiongg@users.noreply.github.com> Date: Sun, 8 Nov 2026 14:56:11 +0000 Subject: [PATCH] Apply review fixes - crates/engine/src/cmd/arrange.rs --- crates/engine/src/cmd/arrange.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/arrange.rs b/crates/engine/src/cmd/arrange.rs index 47b4110d4..2f633501c 100644 --- a/crates/engine/src/cmd/arrange.rs +++ b/crates/engine/src/cmd/arrange.rs @@ -385,10 +385,11 @@ fn ungroup(s: &mut Session, p: &Value) -> Result { }; let freed_ids: Vec = 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), }