From 5b198bb74320d60dc5da515a1a76dce064343686 Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Mon, 22 Aug 2011 18:27:49 +0200 Subject: [PATCH] Fixed crash when re-opening image with auto wb in some situations see issue 929 --- rtengine/procparams.cc | 2 ++ rtgui/whitebalance.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 588362be7..c3fb2abb2 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -358,6 +358,8 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2) const { keyFile.set_string ("White Balance", "Setting", "Camera"); else keyFile.set_string ("White Balance", "Setting", "Custom"); + // not that "Auto" has been ruled out. It's just custom. + keyFile.set_integer ("White Balance", "Temperature", wb.temperature); keyFile.set_double ("White Balance", "Green", wb.green); diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index 42ced6901..413855d1b 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -240,7 +240,7 @@ void WhiteBalance::write (ProcParams* pp, ParamsEdited* pedited) { if (method->get_active_row_number()==0) pp->wb.method = "Camera"; else if (method->get_active_row_number()==1) - pp->wb.method = "Auto"; + pp->wb.method = "Custom"; // "Auto"; // "Auto" is never saved to PP3/XMP. However when reopening images (from RAM) it can lead to crashes because the values are not available yet. else if (method->get_active_row_number()>=2) pp->wb.method = "Custom";