Fixed crash when re-opening image with auto wb in some situations

see issue 929
This commit is contained in:
Oliver Duis
2011-08-22 18:27:49 +02:00
parent ae3dd26dc6
commit 5b198bb743
2 changed files with 3 additions and 1 deletions

View File

@@ -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);

View File

@@ -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";