Fix build crash (see #5232), but this branch is still not usable

This commit is contained in:
Hombre
2019-03-19 22:29:10 +01:00
parent e2caaf3571
commit e0c04955e3
17 changed files with 84 additions and 76 deletions

View File

@@ -746,6 +746,29 @@ void Crop::update(int todo)
parent->ipf.ToneMapFattal02(f);
}
// Apply Spot removal
if (params.spot.enabled) {
if (todo & M_SPOT) {
if(!spotCrop) {
spotCrop = new Imagefloat (cropw, croph);
}
baseCrop->copyData (spotCrop);
PreviewProps pp (cropx, cropy, cropw, croph, skip);
parent->ipf.removeSpots (spotCrop, params.spot.entries, pp);
}
} else {
if (spotCrop) {
delete spotCrop;
}
spotCrop = NULL;
}
if (spotCrop) {
baseCrop = spotCrop;
}
// crop back to the size expected by the rest of the pipeline
if (need_cropping) {
Imagefloat *c = origCrop;
@@ -798,28 +821,6 @@ void Crop::update(int todo)
transCrop = nullptr;
}
if (params.spot.enabled) {
if (todo & M_SPOT) {
if(!spotCrop) {
spotCrop = new Imagefloat (cropw, croph);
}
baseCrop->copyData (spotCrop);
PreviewProps pp (cropx, cropy, cropw, croph, skip);
parent->ipf.removeSpots (spotCrop, params.spot.entries, pp);
}
} else {
if (spotCrop) {
delete spotCrop;
}
spotCrop = NULL;
}
if (spotCrop) {
baseCrop = spotCrop;
}
if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) {
const int W = baseCrop->getWidth();