From c6990dc78328b8c2a1f8f45b524fab784cf4bdda Mon Sep 17 00:00:00 2001 From: DrSlony Date: Fri, 5 Jun 2015 16:54:03 +0200 Subject: [PATCH] Fixed input profile handling for non-raw images, issue 2801 --- rtgui/icmpanel.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 97a71475d..b48e5d96c 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -372,7 +372,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) { if(pp->icm.input.substr(0,5) != "file:" && !ipDialog->get_filename().empty()) ipDialog->set_filename(pp->icm.input); - if (pp->icm.input == "(none)" && icamera->get_state()!=Gtk::STATE_INSENSITIVE) { + if (pp->icm.input == "(none)") { inone->set_active (true); ckbBlendCMSMatrix->set_sensitive (false); updateDCP(pp->icm.dcpIlluminant, ""); @@ -387,13 +387,19 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) { ckbBlendCMSMatrix->set_sensitive (true); updateDCP(pp->icm.dcpIlluminant, ""); } - else if ((pp->icm.input == "(cameraICC)") && icameraICC->get_state()==Gtk::STATE_INSENSITIVE) { + else if ((pp->icm.input == "(cameraICC)") && icamera->get_state()!=Gtk::STATE_INSENSITIVE && icameraICC->get_state()==Gtk::STATE_INSENSITIVE) { // this is the case when (cameraICC) is instructed by packaged profiles, but ICC file is not found // therefore falling back UI to explicitly reflect the (camera) option icamera->set_active (true); ckbBlendCMSMatrix->set_sensitive (false); updateDCP(pp->icm.dcpIlluminant, ""); } + else if ((pp->icm.input == "(cameraICC)") && icamera->get_state()==Gtk::STATE_INSENSITIVE && icameraICC->get_state()==Gtk::STATE_INSENSITIVE) { + // If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded). + iembedded->set_active (true); + ckbBlendCMSMatrix->set_sensitive (false); + updateDCP(pp->icm.dcpIlluminant, ""); + } else if ((pp->icm.input == "(camera)" || pp->icm.input=="") && icamera->get_state()!=Gtk::STATE_INSENSITIVE) { icamera->set_active (true); ckbBlendCMSMatrix->set_sensitive (false);