From 986af6e5ed9815cd7dbab242f6c96bf10ec2bafc Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 22 Jan 2020 10:42:53 +0100 Subject: [PATCH] Added button to reset all show modifications --- rtdata/languages/default | 1 + rtengine/procevents.h | 1 + rtengine/refreshmap.cc | 3 ++- rtgui/locallab.cc | 49 ++++++++++++++++++++++++++++++++++++++-- rtgui/locallab.h | 5 +++- 5 files changed, 55 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 09ebab0b4..7c1da70d7 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2500,6 +2500,7 @@ TP_LOCALLAB_RECURS_TOOLTIP;Recalculate references for hue, luma, chroma after ea TP_LOCALLAB_REFLABEL;Ref. (0..1) Chroma=%1 Luma=%2 Hue=%3 TP_LOCALLAB_REN_DIALOG_LAB;Enter the new Control Spot name TP_LOCALLAB_REN_DIALOG_NAME;Renaming Control Spot +TP_LOCALLAB_RESETSHOW;Reset All Show Modifications TP_LOCALLAB_RESID;Residual Image TP_LOCALLAB_RESIDBLUR;Blur Residual Image TP_LOCALLAB_RESIDCHRO;Residual image Chroma diff --git a/rtengine/procevents.h b/rtengine/procevents.h index e4498903b..df511c036 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -921,6 +921,7 @@ enum ProcEventCode { Evlocallabanglog = 892, EvLocallabSpotcolorde = 893, EvlocallabshowmasksharMethod = 894, + Evlocallabshowreset = 895, NUMOFEVENTS }; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 2e01fba0b..6443b5146 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -924,7 +924,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //Evlocallabstrlog LUMINANCECURVE, //Evlocallabanglog LUMINANCECURVE, //EvLocallabSpotcolorde - LUMINANCECURVE // EvlocallabshowmasksharMethod + LUMINANCECURVE, // EvlocallabshowmasksharMethod + LUMINANCECURVE // Evlocallabshowreset }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 5c1cd6704..67b97f66c 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -766,6 +766,8 @@ labqualcurv(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUALCURV_METHOD") + ":"))) lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))), lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))), +resetshowButton(Gtk::manage(new Gtk::Button(M("TP_LOCALLAB_RESETSHOW")))), + gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))), struFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABSTRUM")))), blurFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABBLURM")))), @@ -3879,6 +3881,9 @@ pe(nullptr) panel->pack_start(*explog, false, false); + + panel->pack_start(*resetshowButton); + resetshowButtonConn = resetshowButton->signal_pressed().connect(sigc::mem_fun(*this, &Locallab::resetshowPressed)); pack_start(*panel); @@ -7188,6 +7193,46 @@ void Locallab::mergecolMethodChanged() } } +void Locallab::resetshowPressed() +{ + disableListener(); + showmaskcolMethod->set_active(0); + showmaskcolMethodinv->set_active(0); + showmaskexpMethod->set_active(0); + showmaskexpMethodinv->set_active(0); + showmaskSHMethod->set_active(0); + showmaskSHMethodinv->set_active(0); + showmaskvibMethod->set_active(0); + showmaskretiMethod->set_active(0); + showmasksoftMethod->set_active(0); + showmasktmMethod->set_active(0); + showmaskblMethod->set_active(0); + showmasklcMethod->set_active(0); + showmaskcbMethod->set_active(0); + showmasksharMethod->set_active(0); + + enableListener(); + showmaskcolMethodChanged(); + showmasksharMethodChanged(); + showmaskcolMethodChangedinv(); + showmaskexpMethodChangedinv(); + showmaskexpMethodChanged(); + showmaskSHMethodChanged(); + showmaskvibMethodChanged(); + showmaskSHMethodChangedinv(); + showmasklcMethodChanged(); + showmaskcbMethodChanged(); + showmaskblMethodChanged(); + showmasktmMethodChanged(); + showmaskretiMethodChanged(); + showmasksoftMethodChanged(); + + if (listener) { + listener->panelChanged(Evlocallabshowreset, ""); + } + +} + void Locallab::showmaskcolMethodChanged() { // printf("showmaskcolMethodChanged\n"); @@ -11734,7 +11779,7 @@ void Locallab::enableListener() enablelogConn.block(false); AutograyConn.block(false); fullimageConn.block(false); - + resetshowButtonConn.block(false); } void Locallab::disableListener() @@ -11839,7 +11884,7 @@ void Locallab::disableListener() enablelogConn.block(true); AutograyConn.block(true); fullimageConn.block(true); - + resetshowButtonConn.block(true); } void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index) diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 927067ded..76251d6b2 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -607,7 +607,9 @@ private: Gtk::Button* const lumacontrastMinusButton; Gtk::Button* const lumaneutralButton; Gtk::Button* const lumacontrastPlusButton; - sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn; + Gtk::Button* const resetshowButton; + + sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn, resetshowButtonConn; Gtk::Frame* const gridFrame; Gtk::Frame* const struFrame; Gtk::Frame* const blurFrame; @@ -781,6 +783,7 @@ private: void lumacontrastMinusPressed(); void lumaneutralPressed(); void lumacontrastPlusPressed(); + void resetshowPressed(); // Locallab GUI management function void updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index);