diff --git a/crates/engine/src/cmd/artboard_cmds.rs b/crates/engine/src/cmd/artboard_cmds.rs index 60bc8e0f35..c53b62e85b 100644 --- a/crates/engine/src/cmd/artboard_cmds.rs +++ b/crates/engine/src/cmd/artboard_cmds.rs @@ -16,7 +16,7 @@ use photocraft_raster::Surface; use serde_json::{Value, json}; use crate::commands::{CommandSpec, color_param, int, int_i32, parse_hex}; -use crate::file_cmds::{SaveOpts, encode, f64_param, join, native_doc, sanitize, stem, str_param, write_file}; +use crate::file_cmds::{encode, f64_param, join, native_doc, sanitize, stem, str_param, write_file}; use crate::{EngineError, Result, Session}; /// Artboard size presets (name, width, height) in pixels, Photoshop's common devices and pages. @@ -1071,7 +1071,9 @@ fn artboards_to_files(s: &mut Session, p: &Value) -> Result { Some(_) if truecolour && one.mode != ColorMode::Rgb => encode(&rgb_copy(&one)?, &path, save)?, Some(_) => encode(&one, &path, save)?, // The PNG-8 writer does not interlace; say so, as the palette PNG path of a save does. - None if save.png_interlaced == Some(true) => (png8(&one, cmd)?, vec!["written without interlacing: the PNG-8 exporter does not interlace".to_owned()]), + None if save.png_interlaced == Some(true) => { + (png8(&one, cmd)?, vec!["written without interlacing: the PNG-8 exporter does not interlace".to_owned()]) + } None => (png8(&one, cmd)?, Vec::new()), }; guard.check()?; @@ -1286,7 +1288,7 @@ pub fn specs() -> Vec { "file.export.artboardsToPdf", "Artboards to PDF…", &["File", "Export"], - r##"{"path":str (.pdf),"content":"overlapping|artboard"="overlapping" (Include Overlapping Areas: a board's page also shows the visible boards above it where they overlap it; artboard: Artboard Content Only),"artboards":[id]?,"quality":0..12=10,"reversePageOrder":bool=false (the default page order the other way round)} → {path, pages} (one raster page per board, bottom artboard of the Layers panel first)"##, + r##"{"path":str (.pdf),"content":"overlapping|artboard"="overlapping" (Include Overlapping Areas: a board's page also shows the visible boards above it where they overlap it; artboard: Artboard Content Only),"artboards":[id]?,"quality":0..12=10,"reversePageOrder":bool=false (the default page order the other way round)} → {path, pages} (one raster page per board, bottom artboard of the Layers panel first)"##, export_artboards, artboards_to_pdf ), @@ -1309,11 +1311,11 @@ mod file_types_tests; #[path = "artboard_cmds/first_board_background_tests.rs"] mod first_board_background_tests; #[cfg(test)] -#[path = "artboard_cmds/include_name_tests.rs"] -mod include_name_tests; -#[cfg(test)] #[path = "artboard_cmds/from_group_reset_props_tests.rs"] mod from_group_reset_props_tests; +#[cfg(test)] +#[path = "artboard_cmds/include_name_tests.rs"] +mod include_name_tests; #[cfg(test)] #[path = "artboard_cmds/from_layers_history_name_tests.rs"] diff --git a/crates/ui-egui/src/artboards_to_pdf_reverse_tests.rs b/crates/ui-egui/src/artboards_to_pdf_reverse_tests.rs index ebc7371bb7..50c0e480fe 100644 --- a/crates/ui-egui/src/artboards_to_pdf_reverse_tests.rs +++ b/crates/ui-egui/src/artboards_to_pdf_reverse_tests.rs @@ -35,6 +35,8 @@ fn open(h: &mut H, path: &str) -> DialogId { let dialog = h.state().framework.dialogs.open_dialogs().into_iter().map(|d| d.id).find(|d| d.value().to_string() == want).unwrap(); h.run_steps(4); h.state_mut().framework.dialogs.set_json_field(&ctx, dialog, "path", json!(path)).unwrap(); + // Every board, not only the selected one: Export Selected Artboards opens ticked while a board is selected (#13647). + h.state_mut().framework.dialogs.set_json_field(&ctx, dialog, "artboards", serde_json::Value::Null).unwrap(); h.run_steps(4); dialog } diff --git a/crates/ui-egui/src/menus/view_cmds/dialogs.rs b/crates/ui-egui/src/menus/view_cmds/dialogs.rs index d15c425a01..2b4cb4f74c 100644 --- a/crates/ui-egui/src/menus/view_cmds/dialogs.rs +++ b/crates/ui-egui/src/menus/view_cmds/dialogs.rs @@ -322,10 +322,15 @@ pub(super) fn params_for(app: &mut PhotocraftApp, id: &str) -> Option<(Vec {