From 19ca183795fd85781dd70beece972ed6f67cb171 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 28 May 2011 13:24:50 -0400 Subject: [PATCH] GUI fix for raw CA aurocorrect (issue 702) --- rtgui/rawcacorrection.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/rtgui/rawcacorrection.cc b/rtgui/rawcacorrection.cc index 5808737fe..5b3efe17f 100644 --- a/rtgui/rawcacorrection.cc +++ b/rtgui/rawcacorrection.cc @@ -56,6 +56,10 @@ void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi lastCA = pp->raw.ca_autocorrect; + // disable Red and Blue sliders when caAutocorrect is enabled + caRed->set_sensitive(!pp->raw.ca_autocorrect); + caBlue->set_sensitive(!pp->raw.ca_autocorrect); + caAutocorrect->set_active(pp->raw.ca_autocorrect); caRed->setValue (pp->raw.cared); caBlue->setValue (pp->raw.cablue); @@ -127,7 +131,7 @@ void RAWCACorr::caCorrectionChanged() lastCA = caAutocorrect->get_active (); } - else { + /*else { // For non batch mode, we disable the red and blue slider if caAutocorrect is true if (caAutocorrect->get_active ()) { caRed->set_sensitive(false); @@ -137,7 +141,19 @@ void RAWCACorr::caCorrectionChanged() caRed->set_sensitive(true); caBlue->set_sensitive(true); } - } + }*/ + + // disable Red and Blue sliders when caAutocorrect is enabled + caRed->set_sensitive(!caAutocorrect->get_active ()); + caBlue->set_sensitive(!caAutocorrect->get_active ()); + if (caAutocorrect->get_active ()){ + // set caRed and caBlue to 0 as RawImageSource::CA_correct_RT uses this as + // a condition for auto-CA correction. Alternative would be to change + // RawImageSource::CA_correct_RT and pass it ca_autocorrect value + caRed->setValue(0); + caBlue->setValue(0); + } + if (listener) listener->panelChanged (EvPreProcessAutoCA, caAutocorrect->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED")); }