Engine: Selection pane select uses the checked shape id param (#97 after main's selection.select)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-14 13:00:05 -04:00
co-authored by Claude Opus 5.5
parent 849f543d38
commit a837c26eda
+4 -1
View File
@@ -28,7 +28,10 @@ pub fn specs() -> Vec<CommandSpec> {
/// together (Ctrl+click on the other kind is ignored, as in PowerPoint), and picking a hidden
/// object from the list shows it again.
fn select(s: &mut Session, p: &Value) -> Result<Value> {
let ids = ids_param(p, "ids").or_else(|| id_param(p, "id").map(|i| vec![i])).unwrap_or_default();
let ids = match ids_param(p, "ids") {
Some(ids) => ids,
None => id_param(p, "id", "selection.select")?.map(|i| vec![i]).unwrap_or_default(),
};
let (toggle, add) = (bool_or(p, "toggle", false), bool_or(p, "add", false));
let st = s.doc()?;
let in_group = |id: &ShapeId| deckcraft_model::parent_of(st.shapes(), *id).map(|p| p.is_some());