diff --git a/crates/ui-egui/src/dialogs/apply_image_source_document_tests.rs b/crates/ui-egui/src/dialogs/apply_image_source_document_tests.rs index 5a6de36ae5..73c48b113d 100644 --- a/crates/ui-egui/src/dialogs/apply_image_source_document_tests.rs +++ b/crates/ui-egui/src/dialogs/apply_image_source_document_tests.rs @@ -162,6 +162,17 @@ fn layer_and_channel_follow_the_chosen_document() { assert!(shown.get("source").is_none(), "the target sends the flat keys: {shown}"); } +#[test] +fn the_source_rows_read_layer_and_channel_for_every_document() { + let (mut app, _) = five_documents(); + let source = index_of(&app, "source"); + let (params, _) = params_for(&mut app, APPLY).unwrap(); + let label = |key: &str| params.iter().find(|p| p.key == key).map(|p| p.label.as_str().to_owned()); + assert_eq!(label("sourceChannel").as_deref(), Some("Channel")); + assert_eq!(label(&channel_key(source)).as_deref(), Some("Channel")); + assert_eq!(label("sourceLayer").as_deref(), Some("Layer")); +} + #[test] fn the_target_line_names_the_target() { let (mut app, _) = five_documents(); diff --git a/crates/ui-egui/src/menus/view_cmds/dialogs.rs b/crates/ui-egui/src/menus/view_cmds/dialogs.rs index 889008d1a5..182aaa9a4e 100644 --- a/crates/ui-egui/src/menus/view_cmds/dialogs.rs +++ b/crates/ui-egui/src/menus/view_cmds/dialogs.rs @@ -637,7 +637,7 @@ fn channel_form(app: &PhotocraftApp, id: &str) -> Option<(Vec, DialogFiel // Scale and Offset only affect Add and Subtract. rows.extend([ on_target(choice("sourceLayer", tl!("Layer"), channels(&layers), &layer)), - on_target(choice("sourceChannel", tl!("Source Channel"), channels(&load), &chans[0])), + on_target(choice("sourceChannel", tl!("Channel"), channels(&load), &chans[0])), ]); rows.extend(apply_image_other_source_rows(app)); rows.extend([