mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Contact Sheet II: end a flattened sheet as a normal layer named Contact Sheet II
This commit is contained in:
1 parent
5bdbcc1181
commit
047afaaa3b
1 file changed
+8
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user