From 11e89e3d2ef3b3a36ba63ab03febadbab52b3b31 Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 10 Apr 2015 02:00:14 +0200 Subject: [PATCH] Solving issue 2735: "Apply/paste partial profile broken in build 4.2.147 - applies full parameters" --- rtengine/procparams.cc | 4 ++-- rtengine/procparams.h | 2 +- rtgui/history.cc | 4 ++-- rtgui/main.cc | 2 +- rtgui/paramsedited.cc | 4 ++-- rtgui/paramsedited.h | 2 +- rtgui/partialpastedlg.cc | 2 +- rtgui/profilepanel.cc | 4 ++-- rtgui/toolpanelcoord.cc | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 881d71cc3..ae866c02e 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3113,10 +3113,10 @@ bool ProcParams::operator!= (const ProcParams& other) { return !(*this==other); } -PartialProfile::PartialProfile(bool createInstance) { +PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue) { if (createInstance) { pparams = new ProcParams(); - pedited = new ParamsEdited(); + pedited = new ParamsEdited(paramsEditedValue); } else { pparams = NULL; diff --git a/rtengine/procparams.h b/rtengine/procparams.h index caddc3ac6..21eb89f51 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1178,7 +1178,7 @@ class PartialProfile { ParamsEdited* pedited; PartialProfile& operator=(PartialProfile& rhs) { pparams=rhs.pparams; pedited=rhs.pedited; return *this; }; - PartialProfile (bool createInstance=false); + PartialProfile (bool createInstance=false, bool paramsEditedValue=false); PartialProfile (ProcParams* pp, ParamsEdited* pe=NULL, bool fullCopy=false); PartialProfile (const ProcParams* pp, const ParamsEdited* pe=NULL); void deleteInstance (); diff --git a/rtgui/history.cc b/rtgui/history.cc index 53365d9aa..0e58ae5b5 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -152,7 +152,7 @@ void History::historySelectionChanged () { bTreeView->get_selection()->unselect_all (); if (row && tpc) { ProcParams pparams = row[historyColumns.params]; - ParamsEdited pe; + ParamsEdited pe(true); PartialProfile pp(&pparams, &pe); ParamsEdited paramsEdited = row[historyColumns.paramsEdited]; tpc->profileChange (&pp, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited); @@ -177,7 +177,7 @@ void History::bookmarkSelectionChanged () { hTreeView->get_selection()->unselect_all (); if (row && tpc) { ProcParams pparams = row[bookmarkColumns.params]; - ParamsEdited pe; + ParamsEdited pe(true); PartialProfile pp(&pparams, &pe); ParamsEdited paramsEdited = row[bookmarkColumns.paramsEdited]; tpc->profileChange (&pp, EvBookmarkSelected, row[bookmarkColumns.text], ¶msEdited); diff --git a/rtgui/main.cc b/rtgui/main.cc index f0c2e4e0c..9ae4a814f 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -542,7 +542,7 @@ int processLineParams( int argc, char **argv ) return 2; if (useDefault) { - rawParams = new rtengine::procparams::PartialProfile(true); + rawParams = new rtengine::procparams::PartialProfile(true, true); Glib::ustring profPath = options.findProfilePath(options.defProfRaw); if (options.is_defProfRawMissing() || profPath.empty() || rawParams->load(profPath==DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfRaw) + paramFileExtension))) { std::cerr << "Error: default raw processing profile not found" << std::endl; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 0306846fd..d1638a227 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -21,9 +21,9 @@ #include "options.h" #include "addsetids.h" -ParamsEdited::ParamsEdited () { +ParamsEdited::ParamsEdited (bool value) { - set (true); + set (value); } void ParamsEdited::set (bool v) { diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 8b1b9dbc5..c95d2fea9 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -664,7 +664,7 @@ class ParamsEdited { bool exif; bool iptc; - ParamsEdited (); + ParamsEdited (bool value=false); void set (bool v); void initFrom (const std::vector& src); diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index 1decc743d..2d593f64a 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -630,7 +630,7 @@ void PartialPasteDlg::metaicmToggled () { void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE) { ParamsEdited falsePE; // falsePE is a workaround to set a group of ParamsEdited to false - ParamsEdited filterPE; // Contains the initial information about the loaded values ; filterPE is set to TRUE (default) so everything has to be copied + ParamsEdited filterPE(true); // Contains the initial information about the loaded values if (srcPE) { filterPE = *srcPE; } diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 6bd7b0359..6071100be 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -574,7 +574,7 @@ void ProfilePanel::selection_changed () { const PartialProfile* s = profileStore.getProfile (pse); if (s) { if (fillMode->get_active() && s->pedited) { - ParamsEdited pe; + ParamsEdited pe(true); PartialProfile s2(s->pparams, &pe, false); changeTo (&s2, pse->label+"+"); } @@ -631,7 +631,7 @@ void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams delete lastsaved; lastsaved = NULL; } if (lastSaved) { - ParamsEdited* pe = new ParamsEdited(); + ParamsEdited* pe = new ParamsEdited(true); // copying the provided last saved profile to ProfilePanel::lastsaved lastsaved = new PartialProfile(lastSaved, pe); } diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 6f6e19864..f7429e563 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -323,7 +323,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi // Derive the effective changes, if it's a profile change, to prevent slow RAW rerendering if not necessary bool filterRawRefresh=false; if (event!=rtengine::EvPhotoLoaded) { - ParamsEdited pe; + ParamsEdited pe(true); std::vector lParams(2); lParams[0]=*params; lParams[1]=*mergedParams; pe.initFrom (lParams);