Guard output summary adjustments behind adjustments_enabled flag

Rotation, flip, brightness, contrast, and other adjustment operations
only appear in the output step summary when the adjustments step is
enabled in the workflow configuration.
This commit is contained in:
2026-03-06 14:57:38 +02:00
parent abd8393079
commit edc5b1acee

View File

@@ -2185,60 +2185,62 @@ fn update_output_summary(ui: &WizardUi) {
ops.push("Sequential rename".to_string()); ops.push("Sequential rename".to_string());
} }
} }
if cfg.rotation > 0 { if cfg.adjustments_enabled {
let rot = match cfg.rotation { if cfg.rotation > 0 {
1 => "Rotate 90", let rot = match cfg.rotation {
2 => "Rotate 180", 1 => "Rotate 90",
3 => "Rotate 270", 2 => "Rotate 180",
4 => "Auto-orient", 3 => "Rotate 270",
_ => "Rotate", 4 => "Auto-orient",
}; _ => "Rotate",
ops.push(rot.to_string()); };
} ops.push(rot.to_string());
if cfg.flip > 0 { }
let fl = match cfg.flip { if cfg.flip > 0 {
1 => "Flip horizontal", let fl = match cfg.flip {
2 => "Flip vertical", 1 => "Flip horizontal",
_ => "Flip", 2 => "Flip vertical",
}; _ => "Flip",
ops.push(fl.to_string()); };
} ops.push(fl.to_string());
if cfg.brightness != 0 { }
ops.push(format!("Brightness {:+}", cfg.brightness)); if cfg.brightness != 0 {
} ops.push(format!("Brightness {:+}", cfg.brightness));
if cfg.contrast != 0 { }
ops.push(format!("Contrast {:+}", cfg.contrast)); if cfg.contrast != 0 {
} ops.push(format!("Contrast {:+}", cfg.contrast));
if cfg.saturation != 0 { }
ops.push(format!("Saturation {:+}", cfg.saturation)); if cfg.saturation != 0 {
} ops.push(format!("Saturation {:+}", cfg.saturation));
if cfg.sharpen { }
ops.push("Sharpen".to_string()); if cfg.sharpen {
} ops.push("Sharpen".to_string());
if cfg.grayscale { }
ops.push("Grayscale".to_string()); if cfg.grayscale {
} ops.push("Grayscale".to_string());
if cfg.sepia { }
ops.push("Sepia".to_string()); if cfg.sepia {
} ops.push("Sepia".to_string());
if cfg.crop_aspect_ratio > 0 { }
let ratio = match cfg.crop_aspect_ratio { if cfg.crop_aspect_ratio > 0 {
1 => "1:1", let ratio = match cfg.crop_aspect_ratio {
2 => "4:3", 1 => "1:1",
3 => "3:2", 2 => "4:3",
4 => "16:9", 3 => "3:2",
5 => "9:16", 4 => "16:9",
6 => "3:4", 5 => "9:16",
7 => "2:3", 6 => "3:4",
_ => "Custom", 7 => "2:3",
}; _ => "Custom",
ops.push(format!("Crop {}", ratio)); };
} ops.push(format!("Crop {}", ratio));
if cfg.trim_whitespace { }
ops.push("Trim whitespace".to_string()); if cfg.trim_whitespace {
} ops.push("Trim whitespace".to_string());
if cfg.canvas_padding > 0 { }
ops.push(format!("Padding {}px", cfg.canvas_padding)); if cfg.canvas_padding > 0 {
ops.push(format!("Padding {}px", cfg.canvas_padding));
}
} }
let summary_text = if ops.is_empty() { let summary_text = if ops.is_empty() {