Contact Sheet II: end a flattened sheet as a normal layer named Contact Sheet II

This commit is contained in:
rmsff committed 2026-11-15 16:40:34 +03:00
1 parent 5bdbcc1181
commit 047afaaa3b
1 file changed
+8
+8
View File
@@ -629,6 +629,14 @@ fn contact_sheet(s: &mut Session, p: &Value) -> Result<Value> {
}
if flatten {
s.execute("layer.flattenImage", json!({}))?;
// The reference ends a flattened sheet with a normal layer, not a Background (#13702).
s.edit("Make Layer", |doc, active| {
let l = doc.background_mut().ok_or(EngineError::Other("the flattened sheet has no Background layer".into()))?;
crate::extra_cmds::unlock_background(l);
l.name = "Contact Sheet II".into();
*active = Some(l.id);
Ok(())
})?;
}
docs.push(idx);
}