fixed the behaviour of add/set for local contrast during batch edits

This commit is contained in:
Alberto Griggio
2018-02-01 11:06:34 +01:00
parent 9a8d2bd8ff
commit 7f969648b3

View File

@@ -1403,18 +1403,19 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (localContrast.enabled) { if (localContrast.enabled) {
toEdit.localContrast.enabled = mods.localContrast.enabled; toEdit.localContrast.enabled = mods.localContrast.enabled;
} }
if (localContrast.radius) {
toEdit.localContrast.radius = mods.localContrast.radius; #define ADDSETVAL_(v, i) \
} do { \
if (localContrast.amount) { if ( v ) { \
toEdit.localContrast.amount = mods.localContrast.amount; toEdit. v = dontforceSet && options.baBehav[ i ] ? toEdit. v + mods. v : mods. v ; \
} } \
if (localContrast.darkness) { } while (false)
toEdit.localContrast.darkness = mods.localContrast.darkness;
} ADDSETVAL_(localContrast.radius, ADDSET_LOCALCONTRAST_RADIUS);
if (localContrast.lightness) { ADDSETVAL_(localContrast.amount, ADDSET_LOCALCONTRAST_AMOUNT);
toEdit.localContrast.lightness = mods.localContrast.lightness; ADDSETVAL_(localContrast.darkness, ADDSET_LOCALCONTRAST_DARKNESS);
} ADDSETVAL_(localContrast.lightness, ADDSET_LOCALCONTRAST_LIGHTNESS);
#undef ADDSETVAL_
if (rgbCurves.enabled) { if (rgbCurves.enabled) {
toEdit.rgbCurves.enabled = mods.rgbCurves.enabled; toEdit.rgbCurves.enabled = mods.rgbCurves.enabled;