Added button to reset all show modifications

This commit is contained in:
Desmis 2020-01-22 10:42:53 +01:00
parent 93afc0ac07
commit 986af6e5ed
5 changed files with 55 additions and 4 deletions

View File

@ -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

View File

@ -921,6 +921,7 @@ enum ProcEventCode {
Evlocallabanglog = 892,
EvLocallabSpotcolorde = 893,
EvlocallabshowmasksharMethod = 894,
Evlocallabshowreset = 895,
NUMOFEVENTS
};

View File

@ -924,7 +924,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //Evlocallabstrlog
LUMINANCECURVE, //Evlocallabanglog
LUMINANCECURVE, //EvLocallabSpotcolorde
LUMINANCECURVE // EvlocallabshowmasksharMethod
LUMINANCECURVE, // EvlocallabshowmasksharMethod
LUMINANCECURVE // Evlocallabshowreset
};

View File

@ -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)

View File

@ -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);