Apply internal default profile (neutral) instead of user defined default profiles for missing parts of existing profile when loading a raw file which already has a .pp3, fixes #5564

This commit is contained in:
Ingo Weyrich 2019-12-17 00:44:01 +01:00
parent 9a0cae0357
commit abac9856e7

View File

@ -341,34 +341,31 @@ void Thumbnail::notifylisterners_procParamsChanged(int whoChangedIt)
* the Preferences). * the Preferences).
* *
* The result is a complete ProcParams with default values merged with the values * The result is a complete ProcParams with default values merged with the values
* from the default Raw or Image ProcParams, then with the values from the loaded * from the loaded ProcParams (sidecar or cache file).
* ProcParams (sidecar or cache file). */
*/
void Thumbnail::loadProcParams () void Thumbnail::loadProcParams ()
{ {
MyMutex::MyLock lock(mutex); MyMutex::MyLock lock(mutex);
pparamsValid = false; pparamsValid = false;
pparams->setDefaults(); pparams->setDefaults();
const PartialProfile *defaultPP = ProfileStore::getInstance()->getDefaultPartialProfile(getType() == FT_Raw);
defaultPP->applyTo(pparams.get());
if (options.paramsLoadLocation == PLL_Input) { if (options.paramsLoadLocation == PLL_Input) {
// try to load it from params file next to the image file // try to load it from params file next to the image file
int ppres = pparams->load (fname + paramFileExtension); const int ppres = pparams->load(fname + paramFileExtension);
pparamsValid = !ppres && pparams->ppVersion >= 220; pparamsValid = !ppres && pparams->ppVersion >= 220;
// if no success, try to load the cached version of the procparams // if no success, try to load the cached version of the procparams
if (!pparamsValid) { if (!pparamsValid) {
pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension)); pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension));
} }
} else { } else {
// try to load it from cache // try to load it from cache
pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension)); pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension));
// if no success, try to load it from params file next to the image file // if no success, try to load it from params file next to the image file
if (!pparamsValid) { if (!pparamsValid) {
int ppres = pparams->load (fname + paramFileExtension); const int ppres = pparams->load(fname + paramFileExtension);
pparamsValid = !ppres && pparams->ppVersion >= 220; pparamsValid = !ppres && pparams->ppVersion >= 220;
} }
} }