DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
M6: say plainly that the export refusal is a tripwire
skylar taylor-barrick1731c95bad48
diff --git a/crates/engine/src/cmd/export.rs b/crates/engine/src/cmd/export.rsindex 443dcbb23..9271898a9 100644--- a/crates/engine/src/cmd/export.rs+++ b/crates/engine/src/cmd/export.rs@@ -686,8 +686,9 @@ fn rasterize_layered(d: &designcraft_doc::Document) -> Result<(Option<designcraf}).collect();if choices.is_empty() {- // Fail closed, with the same predicate as the walk: a stale choice on an item that is no- // longer a placed PDF must not block the export.+ // Fail closed, with the same predicate as the walk. As in the IDML pass this is a tripwire+ // for a future construct the walk misses, not live behaviour; a stale choice on an item that+ // is no longer a placed PDF must not block the export.if super::interchange::has_applicable_pdf_layer_overrides(d) {return Err(EngineError::Other("a placed PDF's layer choice sits where this raster export cannot apply it".into()));}diff --git a/crates/engine/src/cmd/interchange.rs b/crates/engine/src/cmd/interchange.rsindex 24c58df55..3a15b915f 100644--- a/crates/engine/src/cmd/interchange.rs+++ b/crates/engine/src/cmd/interchange.rs@@ -65,10 +65,11 @@ fn with_pdf_layer_variants(doc: &Document, embed: bool) -> Result<Option<Documen}).collect();if choices.is_empty() {- // A choice the walk cannot reach would silently become the file's defaults (a newer nesting- // construct, say), so the copy is refused instead. The predicate matches the walk above:- // both ask for a graphic whose asset is a PDF, so stale fields on a relinked image never- // block an export.+ // A tripwire, not live behaviour: the walk and this predicate cover the same placements, so+ // they can only disagree if a future nesting construct slips past the walk, and that would+ // silently become the file's defaults. Do not narrow the walk to match this check. The+ // predicate asks for a graphic whose asset is a PDF, like the walk, so stale fields left on a+ // relinked image never block an export.if has_applicable_pdf_layer_overrides(doc) {return Err(EngineError::Other("a placed PDF's layer choice sits where this IDML export cannot apply it".into()));}