Address review findings on the new test and fix

This commit is contained in:
eliets2
2026-10-28 08:24:14 +02:00
parent d3ad55637f
commit c73bf30987
+16 -2
View File
@@ -158,8 +158,13 @@ impl DevelopSettings {
}
Section::Color => self.wb.mode = WbMode::AsShot,
Section::Detail => self.enhance.denoise_on = None,
// the creative profile is not a control: the chosen look goes back to the default one
Section::Profile => self.profile.id = Profile::default().id,
// the creative profile is not a control: the chosen look goes back to the default one,
// and so does the camera's own local tone mapping
Section::Profile => {
let d = Profile::default();
self.profile.id = d.id;
self.profile.camera_local_tone = d.camera_local_tone;
}
_ => {}
}
}
@@ -330,6 +335,15 @@ mod tests {
assert_eq!(s.profile.amount, 100.0);
}
#[test]
fn resetting_the_profile_section_clears_the_camera_local_tone() {
// the camera's local tone mapping is not a control either: a Profile reset switches it off
let mut s = DevelopSettings::default();
s.profile.camera_local_tone = true;
s.reset_section(Section::Profile);
assert!(!s.profile.camera_local_tone);
}
#[test]
fn section_toggles() {
let mut s = DevelopSettings::default();