'processing profile -> reset to default' and 'processing profile -> clear' seem broken, fixes #4874

This commit is contained in:
heckflosse
2018-10-18 11:41:00 +02:00
parent a7f64a53a4
commit 415772254f
3 changed files with 5 additions and 4 deletions

View File

@@ -981,7 +981,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
// Empty run to update the thumb
rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams ();
mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER);
mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER, true, true);
}
if (!mselected.empty() && bppcl) {

View File

@@ -417,10 +417,11 @@ bool Thumbnail::hasProcParams () const
return pparamsValid;
}
void Thumbnail::setProcParams (const ProcParams& pp, ParamsEdited* pe, int whoChangedIt, bool updateCacheNow)
void Thumbnail::setProcParams (const ProcParams& pp, ParamsEdited* pe, int whoChangedIt, bool updateCacheNow, bool resetToDefault)
{
const bool needsReprocessing =
pparams.toneCurve != pp.toneCurve
resetToDefault
|| pparams.toneCurve != pp.toneCurve
|| pparams.labCurve != pp.labCurve
|| pparams.localContrast != pp.localContrast
|| pparams.rgbCurves != pp.rgbCurves

View File

@@ -87,7 +87,7 @@ public:
// Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel)
rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool force, bool flaggingMode = false);
void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true);
void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true, bool resetToDefault = false);
void clearProcParams (int whoClearedIt = -1);
void loadProcParams ();