diff --git a/rtdata/languages/default b/rtdata/languages/default
index 3fed6e505..849d9a66b 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -117,7 +117,7 @@ FILEBROWSER_DELETEDLGMSG;Are you sure you want to delete the selected %1
FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version?
FILEBROWSER_EMPTYTRASH;Empty trash
FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files from trash.
-FILEBROWSER_EXEC_CPB;Custom Profile Builder
+FILEBROWSER_RESETDEFAULTPROFILE;Reset to default
FILEBROWSER_EXTPROGMENU;Open with
FILEBROWSER_FLATFIELD;Flat-Field
FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory
diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc
index 5cbb5255b..3e8b2e7cf 100644
--- a/rtgui/filebrowser.cc
+++ b/rtgui/filebrowser.cc
@@ -340,7 +340,7 @@ FileBrowser::FileBrowser ()
p++;
submenuProfileOperations->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1);
p++;
- submenuProfileOperations->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p + 1);
+ submenuProfileOperations->attach (*Gtk::manage(resetdefaultprof = new Gtk::MenuItem (M("FILEBROWSER_RESETDEFAULTPROFILE"))), 0, 1, p, p + 1);
p++;
submenuProfileOperations->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1);
p++;
@@ -358,7 +358,7 @@ FileBrowser::FileBrowser ()
p++;
pmenu->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1);
p++;
- pmenu->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p + 1);
+ pmenu->attach (*Gtk::manage(resetdefaultprof = new Gtk::MenuItem (M("FILEBROWSER_RESETDEFAULTPROFILE"))), 0, 1, p, p + 1);
p++;
pmenu->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1);
p++;
@@ -427,7 +427,7 @@ FileBrowser::FileBrowser ()
partpasteprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), partpasteprof));
applyprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applyprof));
applypartprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applypartprof));
- execcustprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), execcustprof));
+ resetdefaultprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), resetdefaultprof));
clearprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), clearprof));
cachemenu->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), cachemenu));
@@ -960,7 +960,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
}
queue_draw ();
- } else if (m == execcustprof) {
+ } else if (m == resetdefaultprof) {
if (!mselected.empty() && bppcl) {
bppcl->beginBatchPParamsChange(mselected.size());
}
diff --git a/rtgui/filebrowser.h b/rtgui/filebrowser.h
index fdb08ba24..a7474d989 100644
--- a/rtgui/filebrowser.h
+++ b/rtgui/filebrowser.h
@@ -110,7 +110,7 @@ protected:
Gtk::MenuItem* partpasteprof;
Gtk::MenuItem* applyprof;
Gtk::MenuItem* applypartprof;
- Gtk::MenuItem* execcustprof;
+ Gtk::MenuItem* resetdefaultprof;
Gtk::MenuItem* clearprof;
Gtk::MenuItem* cachemenu;
Gtk::MenuItem* clearFromCache;
diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc
index 1be475d59..0bbefa298 100644
--- a/rtgui/thumbnail.cc
+++ b/rtgui/thumbnail.cc
@@ -198,14 +198,13 @@ const ProcParams& Thumbnail::getProcParamsU ()
* The loaded profile may be partial, but it return a complete ProcParams (i.e. without ParamsEdited)
*
* @param returnParams Ask to return a pointer to a ProcParams object if true
- * @param forceCPB True if the Custom Profile Builder has to be invoked, False if the CPB has to be invoked if the profile doesn't
- * exist yet. It depends on other conditions too
+ * @param force True if the profile has to be re-generated even if it already exists
* @param flaggingMode True if the ProcParams will be created because the file browser is being flagging an image
* (rang, to trash, color labels). This parameter is passed to the CPB.
*
* @return Return a pointer to a ProcPamas structure to be updated if returnParams is true and if everything went fine, NULL otherwise.
*/
-rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool forceCPB, bool flaggingMode)
+rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool force, bool flaggingMode)
{
static int index = 0; // Will act as unique identifier during the session
@@ -217,7 +216,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
const CacheImageData* cfs = getCacheImageData();
Glib::ustring defaultPparamsPath = options.findProfilePath(defProf);
- const bool create = (!hasProcParams() || forceCPB);
+ const bool create = (!hasProcParams() || force);
const Glib::ustring outFName =
(options.paramsLoadLocation == PLL_Input) ?
@@ -239,6 +238,11 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
if (!err) {
loadProcParams();
}
+ } else if (create && defProf != DEFPROFILE_DYNAMIC) {
+ const PartialProfile *p = profileStore.getProfile(defProf);
+ if (p && !p->pparams->save(outFName)) {
+ loadProcParams();
+ }
}
if (!options.CPBPath.empty() && !defaultPparamsPath.empty() && create && cfs && cfs->exifValid) {
diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h
index 8c7691ed2..e5b6a72b2 100644
--- a/rtgui/thumbnail.h
+++ b/rtgui/thumbnail.h
@@ -87,7 +87,7 @@ public:
const rtengine::procparams::ProcParams& getProcParamsU (); // Unprotected version
// 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 forceCPB, bool flaggingMode = false);
+ 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 clearProcParams (int whoClearedIt = -1);