Insert and paste count group members when picking the next automatic name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-30 15:53:18 -04:00
co-authored by Claude Opus 5.5
parent 34af55bd6b
commit 352fec7725
4 changed files with 47 additions and 7 deletions
+2 -2
View File
@@ -198,8 +198,8 @@ pub(crate) fn add_shape(s: &mut Session, cmd: &str, mut shape: Shape, select: bo
shape.id = ShapeId(doc.alloc_id().ok_or_else(|| bad(cmd, NO_ID_SPACE))?);
if shape.name.is_empty() {
let base = auto_name_base(&shape);
let taken = super::current_names(doc, sel);
shape.name = first_free_name(&base, &taken, taken.len());
let (taken, count) = super::current_names(doc, sel);
shape.name = first_free_name(&base, &taken, count);
}
let id = shape.id;
let list = crate::shapes_mut(doc, sel).ok_or_else(|| bad("insert", "no slide"))?;