diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 0ed8b1f97..108dac114 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -37,6 +37,7 @@ #include "procparams.h" #include "refreshmap.h" #include "guidedfilter.h" +#include "../rtgui/version.h" #include "../rtgui/options.h" @@ -238,7 +239,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) // Check if any detail crops need high detail. If not, take a fast path short cut if (!highDetailNeeded) { for (size_t i = 0; i < crops.size(); i++) { - if (crops[i]->get_skip() == 1) { // skip=1 -> full resolution + if (crops[i]->get_skip() == 1) { // skip=1 -> full resolution highDetailNeeded = true; break; } @@ -255,10 +256,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) RAWParams rp = params->raw; ColorManagementParams cmp = params->icm; LCurveParams lcur = params->labCurve; - if (settings->verbose) { - printf("metwb2=%s \n", params->wb.method.c_str()); - } - + if (!highDetailNeeded) { // if below 100% magnification, take a fast path if (rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::NONE) && rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO)) { @@ -424,7 +422,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) if (settings->verbose) { printf("automethod=%s \n", params->wb.method.c_str()); } - if (todo & (M_INIT | M_LINDENOISE | M_HDR)) { MyMutex::MyLock initLock(minit); // Also used in crop window diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 7d83b50d2..fe3766287 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1305,6 +1305,8 @@ bool WBParams::operator !=(const WBParams& other) const const std::vector& WBParams::getWbEntries() { + + static const std::vector wb_entries = { {"Camera", WBEntry::Type::CAMERA, M("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f}, // {"Auto", WBEntry::Type::AUTO, M("TP_WBALANCE_AUTO"), 0, 1.f, 1.f, 0.f}, @@ -1349,7 +1351,6 @@ const std::vector& WBParams::getWbEntries() // Should remain the last one {"Custom", WBEntry::Type::CUSTOM, M("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f} }; - return wb_entries; } @@ -4164,10 +4165,26 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Vibrance", "PastSatTog", pedited, vibrance.pastsattog, pedited->vibrance.pastsattog); assignFromKeyfile(keyFile, "Vibrance", "SkinTonesCurve", pedited, vibrance.skintonescurve, pedited->vibrance.skintonescurve); } - if (keyFile.has_group("White Balance")) { assignFromKeyfile(keyFile, "White Balance", "Enabled", pedited, wb.enabled, pedited->wb.enabled); - assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method); + if (keyFile.has_key("White Balance", "Setting")) { +// if(ppVersion < 349) { + Glib::ustring prov = keyFile.get_string("White Balance", "Setting"); +// printf("Prov=%s\n", prov.c_str()); + if(prov == "Auto") { + printf("OK Auto\n"); + prov = "autold"; + wb.method = prov; + keyFile.set_string("White Balance", "Setting",wb.method ); + if (pedited) { + pedited->wb.method = true; + } + assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method); + + } else { + assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method); + } + } assignFromKeyfile(keyFile, "White Balance", "Temperature", pedited, wb.temperature, pedited->wb.temperature); assignFromKeyfile(keyFile, "White Balance", "Green", pedited, wb.green, pedited->wb.green); assignFromKeyfile(keyFile, "White Balance", "Equal", pedited, wb.equal, pedited->wb.equal); diff --git a/rtgui/ppversion.h b/rtgui/ppversion.h index 89f93ed44..3a4019b36 100644 --- a/rtgui/ppversion.h +++ b/rtgui/ppversion.h @@ -1,7 +1,7 @@ #pragma once // This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes -#define PPVERSION 346 +#define PPVERSION 349 #define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified /*