fixed bugs in loading dynamic profiles

This commit is contained in:
Alberto Griggio
2017-03-03 10:00:19 +01:00
parent 6ae57cd556
commit eeb2da2613
4 changed files with 20 additions and 7 deletions

View File

@@ -227,13 +227,17 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
imageMetaData = rtengine::ImageMetaData::fromFile (fname, nullptr);
}
PartialProfile *pp = loadDynamicProfile(imageMetaData);
int err = 0;
if (options.paramsLoadLocation == PLL_Input) {
pp->pparams->save(fname + paramFileExtension);
err = pp->pparams->save(fname + paramFileExtension);
} else {
pp->pparams->save(getCacheFileName ("profiles", paramFileExtension));
err = pp->pparams->save(getCacheFileName ("profiles", paramFileExtension));
}
pp->deleteInstance();
delete pp;
if (!err) {
loadProcParams();
}
} else if (defProf != DEFPROFILE_DYNAMIC && !options.CPBPath.empty() && !defaultPparamsPath.empty() && (!hasProcParams() || forceCPB) && cfs && cfs->exifValid) {
// First generate the communication file, with general values and EXIF metadata
rtengine::ImageMetaData* imageMetaData;