diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 8e99f5b54..726d69347 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -8324,7 +8324,15 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Dehaze", "Strength", pedited, dehaze.strength, pedited->dehaze.strength); assignFromKeyfile(keyFile, "Dehaze", "ShowDepthMap", pedited, dehaze.showDepthMap, pedited->dehaze.showDepthMap); assignFromKeyfile(keyFile, "Dehaze", "Depth", pedited, dehaze.depth, pedited->dehaze.depth); - assignFromKeyfile(keyFile, "Dehaze", "Saturation", pedited, dehaze.saturation, pedited->dehaze.saturation); + if (ppVersion < 349 && dehaze.enabled && keyFile.has_key("Dehaze", "Luminance")) { + const bool luminance = keyFile.get_boolean("Dehaze", "Luminance"); + dehaze.saturation = luminance ? 0 : 100; + if (pedited) { + pedited->dehaze.saturation = true; + } + } else { + assignFromKeyfile(keyFile, "Dehaze", "Saturation", pedited, dehaze.saturation, pedited->dehaze.saturation); + } } if (keyFile.has_group("Film Simulation")) { diff --git a/rtgui/ppversion.h b/rtgui/ppversion.h index 5aef01806..162e63f9e 100644 --- a/rtgui/ppversion.h +++ b/rtgui/ppversion.h @@ -1,11 +1,13 @@ #pragma once // This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes -#define PPVERSION 348 +#define PPVERSION 349 #define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified /* Log of version changes + 349 2020-10-29 + replaced Haze removal Luminance checkbox with an adjuster to blend between luminance and normal mode 348 2018-09-25 Added Locallab tool parameters 347 2019-11-17