Additional manual cleanups to ProcParams::(save|load)()
This commit is contained in:
parent
157b42cd83
commit
c702e5d847
File diff suppressed because it is too large
Load Diff
@ -77,7 +77,7 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
|
||||
dfAuto->set_active( pp->raw.df_autoselect );
|
||||
|
||||
if(pedited ) {
|
||||
dfAuto->set_inconsistent(!pedited->raw.dfAuto );
|
||||
dfAuto->set_inconsistent(!pedited->raw.df_autoselect );
|
||||
}
|
||||
|
||||
if (Glib::file_test (pp->raw.dark_frame, Glib::FILE_TEST_EXISTS)) {
|
||||
@ -152,7 +152,7 @@ void DarkFrame::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.darkFrame = dfChanged;
|
||||
pedited->raw.dfAuto = !dfAuto->get_inconsistent();
|
||||
pedited->raw.df_autoselect = !dfAuto->get_inconsistent();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -423,14 +423,14 @@ void ParamsEdited::set (bool v)
|
||||
raw.xtranssensor.exBlackRed = v;
|
||||
raw.xtranssensor.exBlackGreen = v;
|
||||
raw.xtranssensor.exBlackBlue = v;
|
||||
raw.caCorrection = v;
|
||||
raw.caBlue = v;
|
||||
raw.caRed = v;
|
||||
raw.ca_autocorrect = v;
|
||||
raw.cablue = v;
|
||||
raw.cared = v;
|
||||
raw.hotPixelFilter = v;
|
||||
raw.deadPixelFilter = v;
|
||||
raw.hotDeadPixelThresh = v;
|
||||
raw.hotdeadpix_thresh = v;
|
||||
raw.darkFrame = v;
|
||||
raw.dfAuto = v;
|
||||
raw.df_autoselect = v;
|
||||
raw.ff_file = v;
|
||||
raw.ff_AutoSelect = v;
|
||||
raw.ff_BlurRadius = v;
|
||||
@ -965,14 +965,14 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
raw.xtranssensor.exBlackRed = raw.xtranssensor.exBlackRed && p.raw.xtranssensor.blackred == other.raw.xtranssensor.blackred;
|
||||
raw.xtranssensor.exBlackGreen = raw.xtranssensor.exBlackGreen && p.raw.xtranssensor.blackgreen == other.raw.xtranssensor.blackgreen;
|
||||
raw.xtranssensor.exBlackBlue = raw.xtranssensor.exBlackBlue && p.raw.xtranssensor.blackblue == other.raw.xtranssensor.blackblue;
|
||||
raw.caCorrection = raw.caCorrection && p.raw.ca_autocorrect == other.raw.ca_autocorrect;
|
||||
raw.caRed = raw.caRed && p.raw.cared == other.raw.cared;
|
||||
raw.caBlue = raw.caBlue && p.raw.cablue == other.raw.cablue;
|
||||
raw.ca_autocorrect = raw.ca_autocorrect && p.raw.ca_autocorrect == other.raw.ca_autocorrect;
|
||||
raw.cared = raw.cared && p.raw.cared == other.raw.cared;
|
||||
raw.cablue = raw.cablue && p.raw.cablue == other.raw.cablue;
|
||||
raw.hotPixelFilter = raw.hotPixelFilter && p.raw.hotPixelFilter == other.raw.hotPixelFilter;
|
||||
raw.deadPixelFilter = raw.deadPixelFilter && p.raw.deadPixelFilter == other.raw.deadPixelFilter;
|
||||
raw.hotDeadPixelThresh = raw.hotDeadPixelThresh && p.raw.hotdeadpix_thresh == other.raw.hotdeadpix_thresh;
|
||||
raw.hotdeadpix_thresh = raw.hotdeadpix_thresh && p.raw.hotdeadpix_thresh == other.raw.hotdeadpix_thresh;
|
||||
raw.darkFrame = raw.darkFrame && p.raw.dark_frame == other.raw.dark_frame;
|
||||
raw.dfAuto = raw.dfAuto && p.raw.df_autoselect == other.raw.df_autoselect;
|
||||
raw.df_autoselect = raw.df_autoselect && p.raw.df_autoselect == other.raw.df_autoselect;
|
||||
raw.ff_file = raw.ff_file && p.raw.ff_file == other.raw.ff_file;
|
||||
raw.ff_AutoSelect = raw.ff_AutoSelect && p.raw.ff_AutoSelect == other.raw.ff_AutoSelect;
|
||||
raw.ff_BlurRadius = raw.ff_BlurRadius && p.raw.ff_BlurRadius == other.raw.ff_BlurRadius;
|
||||
@ -2571,15 +2571,15 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.raw.xtranssensor.blackblue = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_BLACKS] ? toEdit.raw.xtranssensor.blackblue + mods.raw.xtranssensor.blackblue : mods.raw.xtranssensor.blackblue;
|
||||
}
|
||||
|
||||
if (raw.caCorrection) {
|
||||
if (raw.ca_autocorrect) {
|
||||
toEdit.raw.ca_autocorrect = mods.raw.ca_autocorrect;
|
||||
}
|
||||
|
||||
if (raw.caRed) {
|
||||
if (raw.cared) {
|
||||
toEdit.raw.cared = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.cared + mods.raw.cared : mods.raw.cared;
|
||||
}
|
||||
|
||||
if (raw.caBlue) {
|
||||
if (raw.cablue) {
|
||||
toEdit.raw.cablue = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.cablue + mods.raw.cablue : mods.raw.cablue;
|
||||
}
|
||||
|
||||
@ -2599,7 +2599,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.raw.deadPixelFilter = mods.raw.deadPixelFilter;
|
||||
}
|
||||
|
||||
if (raw.hotDeadPixelThresh) {
|
||||
if (raw.hotdeadpix_thresh) {
|
||||
toEdit.raw.hotdeadpix_thresh = mods.raw.hotdeadpix_thresh;
|
||||
}
|
||||
|
||||
@ -2607,7 +2607,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.raw.dark_frame = mods.raw.dark_frame;
|
||||
}
|
||||
|
||||
if (raw.dfAuto) {
|
||||
if (raw.df_autoselect) {
|
||||
toEdit.raw.df_autoselect = mods.raw.df_autoselect;
|
||||
}
|
||||
|
||||
@ -3062,8 +3062,8 @@ bool RAWParamsEdited::XTransSensor::isUnchanged() const
|
||||
|
||||
bool RAWParamsEdited::isUnchanged() const
|
||||
{
|
||||
return bayersensor.isUnchanged() && xtranssensor.isUnchanged() && caCorrection && caRed && caBlue && hotPixelFilter && deadPixelFilter && hotDeadPixelThresh && darkFrame
|
||||
&& dfAuto && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType && exPos && exPreser && ff_AutoClipControl && ff_clipControl;
|
||||
return bayersensor.isUnchanged() && xtranssensor.isUnchanged() && ca_autocorrect && cared && cablue && hotPixelFilter && deadPixelFilter && hotdeadpix_thresh && darkFrame
|
||||
&& df_autoselect && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType && exPos && exPreser && ff_AutoClipControl && ff_clipControl;
|
||||
}
|
||||
|
||||
bool LensProfParamsEdited::isUnchanged() const
|
||||
|
@ -764,14 +764,14 @@ public:
|
||||
BayerSensor bayersensor;
|
||||
XTransSensor xtranssensor;
|
||||
|
||||
bool caCorrection;
|
||||
bool caRed;
|
||||
bool caBlue;
|
||||
bool ca_autocorrect;
|
||||
bool cared;
|
||||
bool cablue;
|
||||
bool hotPixelFilter;
|
||||
bool deadPixelFilter;
|
||||
bool hotDeadPixelThresh;
|
||||
bool hotdeadpix_thresh;
|
||||
bool darkFrame;
|
||||
bool dfAuto;
|
||||
bool df_autoselect;
|
||||
bool ff_file;
|
||||
bool ff_AutoSelect;
|
||||
bool ff_BlurRadius;
|
||||
|
@ -943,12 +943,12 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
|
||||
}
|
||||
|
||||
if (!raw_ca_autocorrect->get_active ()) {
|
||||
filterPE.raw.caCorrection = falsePE.raw.caCorrection;
|
||||
filterPE.raw.ca_autocorrect = falsePE.raw.ca_autocorrect;
|
||||
}
|
||||
|
||||
if (!raw_caredblue->get_active ()) {
|
||||
filterPE.raw.caRed = falsePE.raw.caRed;
|
||||
filterPE.raw.caBlue = falsePE.raw.caBlue;
|
||||
filterPE.raw.cared = falsePE.raw.cared;
|
||||
filterPE.raw.cablue = falsePE.raw.cablue;
|
||||
}
|
||||
|
||||
if (!raw_hotpix_filt->get_active ()) {
|
||||
@ -960,7 +960,7 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
|
||||
}
|
||||
|
||||
if (!raw_deadpix_filt->get_active () && !raw_hotpix_filt->get_active ()) {
|
||||
filterPE.raw.hotDeadPixelThresh = falsePE.raw.hotDeadPixelThresh;
|
||||
filterPE.raw.hotdeadpix_thresh = falsePE.raw.hotdeadpix_thresh;
|
||||
}
|
||||
|
||||
if (!df_file->get_active ()) {
|
||||
@ -968,7 +968,7 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
|
||||
}
|
||||
|
||||
if (!df_AutoSelect->get_active ()) {
|
||||
filterPE.raw.dfAuto = falsePE.raw.dfAuto;
|
||||
filterPE.raw.df_autoselect = falsePE.raw.df_autoselect;
|
||||
}
|
||||
|
||||
if (!ff_file->get_active ()) {
|
||||
|
@ -81,7 +81,7 @@ void PreProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedi
|
||||
pp->raw.hotdeadpix_thresh = hdThreshold->getIntValue();
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.hotDeadPixelThresh = hdThreshold->getEditedState ();
|
||||
pedited->raw.hotdeadpix_thresh = hdThreshold->getEditedState ();
|
||||
pedited->raw.hotPixelFilter = !hotPixel->get_inconsistent();
|
||||
pedited->raw.deadPixelFilter = !deadPixel->get_inconsistent();
|
||||
}
|
||||
|
@ -61,9 +61,9 @@ void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
|
||||
disableListener ();
|
||||
|
||||
if(pedited ) {
|
||||
caAutocorrect->setEdited(pedited->raw.caCorrection);
|
||||
caRed->setEditedState( pedited->raw.caRed ? Edited : UnEdited );
|
||||
caBlue->setEditedState( pedited->raw.caBlue ? Edited : UnEdited );
|
||||
caAutocorrect->setEdited(pedited->raw.ca_autocorrect);
|
||||
caRed->setEditedState( pedited->raw.cared ? Edited : UnEdited );
|
||||
caBlue->setEditedState( pedited->raw.cablue ? Edited : UnEdited );
|
||||
}
|
||||
|
||||
// disable Red and Blue sliders when caAutocorrect is enabled
|
||||
@ -84,9 +84,9 @@ void RAWCACorr::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
|
||||
pp->raw.cablue = caBlue->getValue();
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.caCorrection = !caAutocorrect->get_inconsistent();
|
||||
pedited->raw.caRed = caRed->getEditedState ();
|
||||
pedited->raw.caBlue = caBlue->getEditedState ();
|
||||
pedited->raw.ca_autocorrect = !caAutocorrect->get_inconsistent();
|
||||
pedited->raw.cared = caRed->getEditedState ();
|
||||
pedited->raw.cablue = caBlue->getEditedState ();
|
||||
}
|
||||
|
||||
}
|
||||
@ -132,8 +132,8 @@ void RAWCACorr::setDefaults(const rtengine::procparams::ProcParams* defParams, c
|
||||
caBlue->setDefault( defParams->raw.cablue);
|
||||
|
||||
if (pedited) {
|
||||
caRed->setDefaultEditedState( pedited->raw.caRed ? Edited : UnEdited);
|
||||
caBlue->setDefaultEditedState( pedited->raw.caBlue ? Edited : UnEdited);
|
||||
caRed->setDefaultEditedState( pedited->raw.cared ? Edited : UnEdited);
|
||||
caBlue->setDefaultEditedState( pedited->raw.cablue ? Edited : UnEdited);
|
||||
} else {
|
||||
caRed->setDefaultEditedState( Irrelevant );
|
||||
caBlue->setDefaultEditedState( Irrelevant );
|
||||
|
Loading…
x
Reference in New Issue
Block a user