LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
LR-BEHAV-DIALOGS: an unusable denoise model closes, export guide names the real button
Nathaniel Ledford039a44ea8c76
diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rsindex 876787c4d..f2d2e8822 100644--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@ -344,8 +344,8 @@ fn ok_label(app: &LightcraftApp, dlg: &Dialog, informational: bool, sam: &SamStaDialog::SlideshowExport { .. } => "Export…",Dialog::Print => "Print to PDF…",Dialog::Merge { .. } => "Merge",- Dialog::DenoiseModel { info, .. } if info["download"].is_string() => "Accept & Download",- Dialog::DenoiseModel { .. } => "Install",+ Dialog::DenoiseModel { info, .. } if !informational && info["download"].is_string() => "Accept & Download",+ Dialog::DenoiseModel { .. } if !informational => "Install",Dialog::FaceModel { info, .. } if !informational && info["download"].is_string() => "Download",Dialog::FaceModel { .. } if !informational => "Install",Dialog::ConfirmDelete { .. } | Dialog::DeleteKeyword { .. } | Dialog::DeleteEffects { .. } => "Delete",@@ -389,6 +389,7 @@ fn ok_label(app: &LightcraftApp, dlg: &Dialog, informational: bool, sam: &SamSta| Dialog::ManageEffects { .. }| Dialog::ViewOptions| Dialog::LightroomResult { .. }+ | Dialog::DenoiseModel { .. }| Dialog::FaceModel { .. } => "Close",};label.to_string()diff --git a/crates/ui-egui/src/tests/dialog_copy.rs b/crates/ui-egui/src/tests/dialog_copy.rsindex 6e6f7209f..0e45d5af7 100644--- a/crates/ui-egui/src/tests/dialog_copy.rs+++ b/crates/ui-egui/src/tests/dialog_copy.rs@@ -131,6 +131,17 @@ fn export_confirm_says_how_many_photos() {}}+#[test]+fn an_unusable_model_file_only_closes() {+ let mut h = demo();+ for kind in ["denoiseModel", "faceModel"] {+ let mut d = json!({"kind": kind, "info": {"kind": "unsupported", "fileName": "x.onnx", "sizeBytes": 1}, "accepted": false});+ d["path"] = json!("x.onnx");+ show(&mut h, dialog(d));+ assert_eq!(confirm_label(&h), "Close", "{kind}");+ }+}+#[test]fn the_confirm_is_the_verb_in_another_language() {struct Restore;diff --git a/docs/user/guides/export-photos.md b/docs/user/guides/export-photos.mdindex c484a4696..a563379a8 100644--- a/docs/user/guides/export-photos.md+++ b/docs/user/guides/export-photos.md@@ -5,7 +5,7 @@ order: 40verified: 0.7.1----Select the photos, then choose **File** > **Export…**. Pick a format, a size and a folder, then click **Export** (the button also says how many photos, such as **Export 3 Photos**). Your originals are not changed.+Select the photos, then choose **File** > **Export…**. Pick a format, a size and a folder, then click the export button, which says how many photos it will export, such as **Export 3 Photos**. Your originals are not changed.## Steps@@ -20,7 +20,7 @@ Select the photos, then choose **File** > **Export…**. Pick a format, a size a9. Set **File name** to a template such as `{name}-{seq}`. Click **Tags** to see the tags you can insert.10. Set **If file exists** to **Add number**, **Overwrite** or **Skip**.11. On macOS, tick **Add to Apple Photos** to add the exported files to Photos as well. Type an **Album** name to put them in that album. The first time, macOS asks whether LightCraft may control Photos.-12. Click **Export** (such as **Export 3 Photos**). The export shows its progress in the activity stack at the top left.+12. Click the export button, which says how many photos it will export, such as **Export 3 Photos**. The export shows its progress in the activity stack at the top left.If you did not choose a folder, the window stays open and shows an error, so your choices are not lost.