do not overwrite an existing pp3 in "Reset to default" if a custom profile builder is present

Fixes #3906
This commit is contained in:
Alberto Griggio
2017-06-26 23:36:18 +02:00
parent 3449945f25
commit 143f510b9f

View File

@@ -218,12 +218,14 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
const CacheImageData* cfs = getCacheImageData(); const CacheImageData* cfs = getCacheImageData();
Glib::ustring defaultPparamsPath = options.findProfilePath(defProf); Glib::ustring defaultPparamsPath = options.findProfilePath(defProf);
const bool create = (!hasProcParams() || force); const bool create = (!hasProcParams() || force);
const bool run_cpb = !options.CPBPath.empty() && !defaultPparamsPath.empty() && cfs && cfs->exifValid && create;
const Glib::ustring outFName = const Glib::ustring outFName =
(options.paramsLoadLocation == PLL_Input && options.saveParamsFile) ? (options.paramsLoadLocation == PLL_Input && options.saveParamsFile) ?
fname + paramFileExtension : fname + paramFileExtension :
getCacheFileName("profiles", paramFileExtension); getCacheFileName("profiles", paramFileExtension);
if (!run_cpb) {
if (defProf == DEFPROFILE_DYNAMIC && create && cfs && cfs->exifValid) { if (defProf == DEFPROFILE_DYNAMIC && create && cfs && cfs->exifValid) {
rtengine::ImageMetaData* imageMetaData; rtengine::ImageMetaData* imageMetaData;
if (getType() == FT_Raw) { if (getType() == FT_Raw) {
@@ -245,8 +247,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
loadProcParams(); loadProcParams();
} }
} }
} else {
if (!options.CPBPath.empty() && !defaultPparamsPath.empty() && create && cfs && cfs->exifValid) {
// First generate the communication file, with general values and EXIF metadata // First generate the communication file, with general values and EXIF metadata
rtengine::ImageMetaData* imageMetaData; rtengine::ImageMetaData* imageMetaData;