diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index df354bfd8..2a2f1079b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1936,20 +1936,20 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) ipf.ciecam_02float(ncie, float (adap), pW, 2, nprevl, params.get(), customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 0, scale, execsharp, d, dj, yb, 1); - if ((params->colorappearance.autodegree || params->colorappearance.autodegreeout) && acListener && params->colorappearance.enabled && !params->colorappearance.presetcat02) { + if ((params->colorappearance.autodegree || params->colorappearance.autodegreeout) && acListener && params->colorappearance.enabled) { acListener->autoCamChanged(100.* (double)d, 100.* (double)dj); } - if (params->colorappearance.autoadapscen && acListener && params->colorappearance.enabled && !params->colorappearance.presetcat02) { + if (params->colorappearance.autoadapscen && acListener && params->colorappearance.enabled) { acListener->adapCamChanged(adap); //real value of adapt scene } - if (params->colorappearance.autoybscen && acListener && params->colorappearance.enabled && !params->colorappearance.presetcat02) { + if (params->colorappearance.autoybscen && acListener && params->colorappearance.enabled) { acListener->ybCamChanged((int) yb); //real value Yb scene } - // if (params->colorappearance.enabled && params->colorappearance.presetcat02 && params->colorappearance.autotempout) { - // if (params->colorappearance.enabled && params->colorappearance.presetcat02) { + // if (params->colorappearance.enabled && params->colorappearance.autotempout) { + // if (params->colorappearance.enabled) { // acListener->wbCamChanged(params->wb.temperature, params->wb.green); //real temp and tint // acListener->wbCamChanged(params->wb.temperature, 1.f); //real temp and tint = 1. // } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index c9c420b44..3f30374f7 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1461,8 +1461,7 @@ ColorAppearanceParams::ColorAppearanceParams() : ybout(18), greenout(1.0), tempsc(5003), - greensc(1.0), - presetcat02(false) + greensc(1.0) { } @@ -1512,8 +1511,7 @@ bool ColorAppearanceParams::operator ==(const ColorAppearanceParams& other) cons && ybout == other.ybout && greenout == other.greenout && tempsc == other.tempsc - && greensc == other.greensc - && presetcat02 == other.presetcat02; + && greensc == other.greensc; } bool ColorAppearanceParams::operator !=(const ColorAppearanceParams& other) const @@ -6146,7 +6144,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->colorappearance.ybout, "Color appearance", "Ybout", colorappearance.ybout, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.datacie, "Color appearance", "Datacie", colorappearance.datacie, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.tonecie, "Color appearance", "Tonecie", colorappearance.tonecie, keyFile); - saveToKeyfile(!pedited || pedited->colorappearance.presetcat02, "Color appearance", "Presetcat02", colorappearance.presetcat02, keyFile); const std::map ca_mapping = { {ColorAppearanceParams::TcMode::LIGHT, "Lightness"}, @@ -8107,7 +8104,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Color appearance", "Ybout", pedited, colorappearance.ybout, pedited->colorappearance.ybout); assignFromKeyfile(keyFile, "Color appearance", "Datacie", pedited, colorappearance.datacie, pedited->colorappearance.datacie); assignFromKeyfile(keyFile, "Color appearance", "Tonecie", pedited, colorappearance.tonecie, pedited->colorappearance.tonecie); - assignFromKeyfile(keyFile, "Color appearance", "Presetcat02", pedited, colorappearance.presetcat02, pedited->colorappearance.presetcat02); const std::map tc_mapping = { {"Lightness", ColorAppearanceParams::TcMode::LIGHT}, diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 309bcb2ab..df319ffcc 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -709,7 +709,6 @@ struct ColorAppearanceParams { double greenout; int tempsc; double greensc; - bool presetcat02; ColorAppearanceParams(); diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index a0d341cf2..5cae8cce8 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -220,7 +220,6 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" milestones.push_back ( GradientMilestone (1., 1., 1., 1.) ); auto m = ProcEventMapper::getInstance(); - Evcatpreset = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CAT02PRESET"); EvCATAutotempout = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_TEMPOUT"); EvCATillum = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ILLUM"); EvCATcomplex = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CATCOMPLEX"); @@ -269,10 +268,6 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" catHBox->pack_start(*catmethod); genVBox->pack_start (*catHBox, Gtk::PACK_SHRINK); - presetcat02 = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_PRESETCAT02"))); - presetcat02->set_tooltip_markup (M("TP_COLORAPP_PRESETCAT02_TOOLTIP")); - presetcat02conn = presetcat02->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::presetcat02pressed)); -// genVBox->pack_start (*presetcat02, Gtk::PACK_SHRINK); genFrame->add (*genVBox); pack_start (*genFrame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -874,7 +869,6 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) tcmodeconn.block (true); tcmode2conn.block (true); tcmode3conn.block (true); - presetcat02conn.block (true); shape->setCurve (pp->colorappearance.curve); shape2->setCurve (pp->colorappearance.curve2); shape3->setCurve (pp->colorappearance.curve3); @@ -882,7 +876,6 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) toneCurveMode2->set_active (toUnderlying(pp->colorappearance.curveMode2)); toneCurveMode3->set_active (toUnderlying(pp->colorappearance.curveMode3)); curveMode3Changed(); // This will set the correct sensitive state of depending Adjusters - presetcat02->set_active(pp->colorappearance.presetcat02); nexttemp = pp->wb.temperature; nextgreen = 1.; //pp->wb.green; @@ -946,7 +939,6 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) if (!pedited->colorappearance.curveMode3) { toneCurveMode3->set_active (3); } - presetcat02->set_inconsistent(!pedited->colorappearance.presetcat02); } @@ -1134,10 +1126,6 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) ybout->setValue (pp->colorappearance.ybout); tempsc->setValue (pp->colorappearance.tempsc); greensc->setValue (pp->colorappearance.greensc); - presetcat02conn.block (true); - presetcat02->set_active (pp->colorappearance.presetcat02); - presetcat02conn.block (false); - lastpresetcat02 = pp->colorappearance.presetcat02; if (complexmethod->get_active_row_number() == 0) { updateGUIToMode(0); @@ -1202,7 +1190,6 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.ybout = ybout->getValue (); pp->colorappearance.tempsc = tempsc->getValue (); pp->colorappearance.greensc = greensc->getValue (); - pp->colorappearance.presetcat02 = presetcat02->get_active(); int tcMode = toneCurveMode->get_active_row_number(); @@ -1276,7 +1263,6 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.ybout = ybout->getEditedState (); pedited->colorappearance.tempsc = tempsc->getEditedState (); pedited->colorappearance.greensc = greensc->getEditedState (); - pedited->colorappearance.presetcat02 = presetcat02->get_inconsistent (); // pedited->colorappearance.autotempout = !tempout->getAutoInconsistent(); } @@ -1397,10 +1383,6 @@ void ColorAppearance::convertParamToNormal() shape2->reset(); shape3->reset(); wbmodel->set_active (0); - if (presetcat02->get_active ()) { - wbmodel->set_active (2); - illumChanged(); - } if (catmethod->get_active_row_number() == 1 || catmethod->get_active_row_number() == 2) { wbmodel->set_active (2); illumChanged(); @@ -1705,140 +1687,6 @@ void ColorAppearance::badpix_toggled () { } */ -void ColorAppearance::presetcat02pressed () //keep in case of... -{ - if (presetcat02->get_active ()) { - disableListener(); - jlight->resetValue (false); - qbright->resetValue (false); - chroma->resetValue (false); - schroma->resetValue (false); - mchroma->resetValue (false); - rstprotection->resetValue (false); - contrast->resetValue (false); - qcontrast->resetValue (false); - colorh->resetValue (false); - tempout->resetValue (false); - greenout->resetValue (false); - ybout->resetValue (false); - tempsc->resetValue (false); - greensc->resetValue (false); - badpixsl->resetValue (false); - wbmodel->set_active (0); - illum->set_active (2); - toneCurveMode->set_active (0); - toneCurveMode2->set_active (1); - toneCurveMode3->set_active (0); - shape->reset(); - shape2->reset(); - shape3->reset(); - gamutconn.block (true); - gamut->set_active (true); - gamutconn.block (false); - degree->setAutoValue (true); - degree->resetValue (false); - degree->setValue(90); - adapscen->resetValue (false); - adapscen->setAutoValue (true); - degreeout->resetValue (false); - degreeout->setAutoValue (true); - ybscen->resetValue (false); - ybscen->setAutoValue (true); - surrsrc->set_active (0); - wbmodel->set_active (2); - tempsc->resetValue (false); - greensc->resetValue (false); - adapscen->setValue(400.); - ybscen->setValue(18); - surround->set_active (0); - adaplum->setValue(400.); - degreeout->setValue(90); - ybout->setValue(18); - tempout->setValue (nexttemp); - -/* if(tempout->getAutoValue()) { - tempout->resetValue (false); - } else { - tempout->setValue (nexttemp); - tempout->setAutoValue (true); - } -*/ - greenout->setValue (nextgreen); - enableListener(); - } else { - disableListener(); -/* jlight->resetValue (false); - qbright->resetValue (false); - chroma->resetValue (false); - schroma->resetValue (false); - mchroma->resetValue (false); - rstprotection->resetValue (false); - contrast->resetValue (false); - qcontrast->resetValue (false); - colorh->resetValue (false); - tempout->resetValue (false); - greenout->resetValue (false); - ybout->resetValue (false); - tempsc->resetValue (false); - greensc->resetValue (false); - badpixsl->resetValue (false); - wbmodel->set_active (0); - toneCurveMode->set_active (0); - toneCurveMode2->set_active (0); - toneCurveMode3->set_active (0); - shape->reset(); - shape2->reset(); - shape3->reset(); - gamutconn.block (true); - gamut->set_active (true); - gamutconn.block (false); -*/ - degree->setAutoValue (true); - degree->resetValue (false); - adapscen->resetValue (false); - adapscen->setAutoValue (true); - degreeout->resetValue (false); - degreeout->setAutoValue (true); - ybscen->resetValue (false); - ybscen->setAutoValue (true); - surrsrc->set_active (0); - wbmodel->set_active (0); - illum->set_active (2); - tempsc->resetValue (false); - greensc->resetValue (false); - adapscen->resetValue (false); - ybscen->resetValue (false); - surround->set_active (0); - adaplum->resetValue (false); - degreeout->resetValue (false); - ybout->resetValue (false); - tempout->resetValue (false); - greenout->resetValue (false); - enableListener(); - - } - if (batchMode) { - if (presetcat02->get_inconsistent()) { - presetcat02->set_inconsistent (false); - presetcat02conn.block (true); - presetcat02->set_active (false); - presetcat02conn.block (false); - } else if (lastpresetcat02) { - presetcat02->set_inconsistent (true); - } - - lastpresetcat02 = presetcat02->get_active (); - } - - if (listener) { - if (presetcat02->get_active ()) { - listener->panelChanged (Evcatpreset, M ("GENERAL_ENABLED")); - } else { - listener->panelChanged (Evcatpreset, M ("GENERAL_DISABLED")); - } - } - -} void ColorAppearance::datacie_toggled () { @@ -2001,9 +1849,6 @@ void ColorAppearance::autoCamChanged (double ccam, double ccamout) void ColorAppearance::adapCamChanged (double cadap) { - if(presetcat02->get_active()){ - return; - } idle_register.add( [this, cadap]() -> bool @@ -2034,9 +1879,6 @@ void ColorAppearance::wbCamChanged (double temp, double tin) void ColorAppearance::ybCamChanged (int ybsc) { - if(presetcat02->get_active()){ - return; - } idle_register.add( [this, ybsc]() -> bool @@ -2122,16 +1964,6 @@ void ColorAppearance::adjusterChanged(Adjuster* a, double newval) void ColorAppearance::adjusterAutoToggled(Adjuster* a) { - /* - if(presetcat02->get_active ()){ - if(tempout->getAutoValue()) { - tempout->resetValue (false); - } else { - tempout->setValue (nexttemp); - tempout->setAutoValue (true); - } - } -*/ if (multiImage) { if (degree->getAutoInconsistent()) { degree->setAutoInconsistent (false); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index ce1971e85..d3953c11f 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -68,7 +68,6 @@ public: bool adapCamComputed_ (); void ybCamChanged (int yb) override; bool ybCamComputed_ (); - void presetcat02pressed (); void curveChanged (CurveEditor* ce) override; void curveMode1Changed (); bool curveMode1Changed_ (); @@ -106,7 +105,6 @@ public: void writeOptions (std::vector &tpOpen); private: - rtengine::ProcEvent Evcatpreset; rtengine::ProcEvent EvCATAutotempout; rtengine::ProcEvent EvCATillum; rtengine::ProcEvent EvCATcomplex; @@ -159,8 +157,6 @@ private: Gtk::CheckButton* tonecie; // Gtk::CheckButton* sharpcie; Gtk::Button* neutral; - Gtk::CheckButton* presetcat02; - sigc::connection presetcat02conn; MyComboBoxText* surrsrc; sigc::connection surrsrcconn; @@ -198,7 +194,6 @@ private: bool lastgamut; bool lastdatacie; bool lasttonecie; - bool lastpresetcat02; double nexttemp; double nextgreen; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 9c7a92f39..41b19edf2 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -254,7 +254,6 @@ void ParamsEdited::set(bool v) colorappearance.ybout = v; colorappearance.tempsc = v; colorappearance.greensc = v; - colorappearance.presetcat02 = v; //colorBoost.amount = v; //colorBoost.avoidclip = v; @@ -955,7 +954,6 @@ void ParamsEdited::initFrom(const std::vector& colorappearance.ybout = colorappearance.ybout && p.colorappearance.ybout == other.colorappearance.ybout; colorappearance.tempsc = colorappearance.tempsc && p.colorappearance.tempsc == other.colorappearance.tempsc; colorappearance.greensc = colorappearance.greensc && p.colorappearance.greensc == other.colorappearance.greensc; - colorappearance.presetcat02 = colorappearance.presetcat02 && p.colorappearance.presetcat02 == other.colorappearance.presetcat02; //colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount; //colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip; @@ -3034,9 +3032,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.colorappearance.tonecie = mods.colorappearance.tonecie; } - if (colorappearance.presetcat02) { - toEdit.colorappearance.presetcat02 = mods.colorappearance.presetcat02; - } // if (colorappearance.sharpcie) toEdit.colorappearance.sharpcie = mods.colorappearance.sharpcie; if (impulseDenoise.enabled) { diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 3c108f33d..43b4e4e40 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -305,7 +305,6 @@ struct ColorAppearanceParamsEdited { bool ybout; bool tempsc; bool greensc; - bool presetcat02; }; struct DirPyrDenoiseParamsEdited {