From a4ab8f9fbafcf48961e15a26b15c6c80a0fd7efa Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 16 Dec 2020 12:39:20 +0100 Subject: [PATCH] Display status enable mask for denoise --- rtdata/languages/default | 2 ++ rtgui/locallabtools.cc | 30 +++++++++++++++++++++++++++++- rtgui/locallabtools.h | 3 +++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index c77438f8f..93fba3260 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2764,6 +2764,8 @@ TP_LOCALLAB_MASKLC_TOOLTIP;This allows you to target the denoise based on the im TP_LOCALLAB_MASKLCTHR;Light area luminance % threshold TP_LOCALLAB_MASKLCTHRLOW; Dark area luminance % threshold TP_LOCALLAB_MASKLNOISELOW;Reinforce denoise in dark areas +TP_LOCALLAB_MASKUSABLE;Mask usable +TP_LOCALLAB_MASKUNUSABLE;No mask TP_LOCALLAB_MASK_TOOLTIP;You can enable multiple masks for a tool by activating another tool and using only the mask (set the tool sliders to 0 ).\n\nYou can also duplicate the RT-spot and place it close to the first spot. The small variations in the spot references allows you to make fine adjustments. TP_LOCALLAB_MED;Medium TP_LOCALLAB_MEDIAN;Median Low diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index cb4fc3312..817ad926b 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -5761,7 +5761,9 @@ LocallabBlur::LocallabBlur(): LocalcurveEditorwavden(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVDEN"))), wavshapeden(static_cast(LocalcurveEditorwavden->addCurve(CT_Flat, "", nullptr, false, false))), expdenoise1(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI1_EXP")))), - // usemask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_USEMASK")))), + maskusable(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusable(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), +// usemask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_USEMASK")))), lnoiselow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLNOISELOW"), 0.7, 2., 0.01, 1.))), levelthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 10., 100., 1., 40.))), levelthrlow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 100., 1., 12.))), @@ -6046,6 +6048,8 @@ LocallabBlur::LocallabBlur(): wavBox->pack_start(*LocalcurveEditorwavhue, Gtk::PACK_SHRINK, 4); ToolParamBlock* const wavBox1 = Gtk::manage(new ToolParamBlock()); // wavBox1->pack_start(*usemask, Gtk::PACK_SHRINK, 0); + wavBox1->pack_start(*maskusable, Gtk::PACK_SHRINK, 0); + wavBox1->pack_start(*maskunusable, Gtk::PACK_SHRINK, 0); wavBox1->pack_start(*lnoiselow, Gtk::PACK_SHRINK, 0); wavBox1->pack_start(*levelthrlow, Gtk::PACK_SHRINK, 0); wavBox1->pack_start(*levelthr, Gtk::PACK_SHRINK, 0); @@ -6971,6 +6975,8 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) fftwbl->hide(); expmaskbl->hide(); expdenoise1->hide(); + maskusable->hide(); + maskunusable->hide(); break; @@ -6992,6 +6998,13 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) showmaskblMethodtyp->set_active(2); } } + if (enablMask->get_active()) { + maskusable->show(); + maskunusable->hide(); + } else { + maskusable->hide(); + maskunusable->show(); + } break; @@ -7016,6 +7029,13 @@ void LocallabBlur::updateGUIToMode(const modeType new_type) showmaskblMethodtyp->set_active(2); } } + if (enablMask->get_active()) { + maskusable->show(); + maskunusable->hide(); + } else { + maskusable->hide(); + maskunusable->show(); + } } } @@ -7212,6 +7232,14 @@ void LocallabBlur::showmaskblMethodtypChanged() void LocallabBlur::enablMaskChanged() { + if (enablMask->get_active()) { + maskusable->show(); + maskunusable->hide(); + } else { + maskusable->hide(); + maskunusable->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enablMask->get_active()) { diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 7b8409524..c8463fa31 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -664,6 +664,9 @@ private: CurveEditorGroup* const LocalcurveEditorwavden; FlatCurveEditor* const wavshapeden; MyExpander* const expdenoise1; + Gtk::Label* const maskusable; + Gtk::Label* const maskunusable; + // Gtk::CheckButton* const usemask; Adjuster* const lnoiselow; Adjuster* const levelthr;