From ef49d9eefd2a20b0dea22460163c0dada9c0c5f8 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 30 May 2021 07:53:19 +0200 Subject: [PATCH] Disable masks when tool is disable --- rtengine/iplocallab.cc | 2 +- rtgui/locallabtools.cc | 51 ++++++++++++++++++++++++++--------------- rtgui/locallabtools2.cc | 42 ++++++++++++++++++++++----------- 3 files changed, 61 insertions(+), 34 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 00b379271..5b7160b83 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -4418,6 +4418,7 @@ void ImProcFunctions::retinex_pde(const float * datain, float * dataout, int bfw */ // BENCHFUN + #ifdef RT_FFTW3F_OMP if (multiThread) { fftwf_init_threads(); @@ -14140,7 +14141,6 @@ void ImProcFunctions::Lab_Local( if (lp.softmet == 0) { ImProcFunctions::softLight(bufexpfin.get(), softLightParams); } else if (lp.softmet == 1) { - const std::unique_ptr datain(new float[bfwr * bfhr]); const std::unique_ptr dataout(new float[bfwr * bfhr]); const std::unique_ptr dE(new float[bfwr * bfhr]); diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 371c1892b..45262bce3 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -2294,9 +2294,10 @@ void LocallabColor::showmaskcolMethodChanged() if (locToolListener) { locToolListener->resetOtherMaskView(this); } - - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -2311,9 +2312,10 @@ void LocallabColor::showmaskcolMethodChangedinv() if (locToolListener) { locToolListener->resetOtherMaskView(this); } - - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -3709,8 +3711,10 @@ void LocallabExposure::showmaskexpMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -3726,8 +3730,10 @@ void LocallabExposure::showmaskexpMethodChangedinv() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -4851,8 +4857,10 @@ void LocallabShadow::showmaskSHMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -4868,8 +4876,10 @@ void LocallabShadow::showmaskSHMethodChangedinv() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -5882,8 +5892,10 @@ void LocallabVibrance::showmaskvibMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -6289,9 +6301,10 @@ void LocallabSoft::showmasksoftMethodChanged() if (locToolListener) { locToolListener->resetOtherMaskView(this); } - - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index f49667ff8..a4bce7301 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -741,8 +741,10 @@ void LocallabTone::showmasktmMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -1864,8 +1866,10 @@ void LocallabRetinex::showmaskretiMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -2318,8 +2322,10 @@ void LocallabSharp::showmasksharMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -4242,8 +4248,10 @@ void LocallabContrast::showmasklcMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -5073,8 +5081,10 @@ void LocallabCBDL::showmaskcbMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -5938,8 +5948,10 @@ void LocallabLog::showmaskLMethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } } @@ -7226,8 +7238,10 @@ void LocallabMask::showmask_MethodChanged() locToolListener->resetOtherMaskView(this); } - if (listener) { - listener->panelChanged(EvlocallabshowmaskMethod, ""); + if(exp->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshowmaskMethod, ""); + } } }