From 7b0a9c01c5832d74a1e7d2b4bf1bd44ca7ddb36f Mon Sep 17 00:00:00 2001 From: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com> Date: Sun, 2 Sep 2018 20:40:11 +0200 Subject: [PATCH] Fix for usability of highlight threshold slider and shadow compression in batch mode --- rtgui/tonecurve.cc | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index 1354dd81b..5205d6f18 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -229,11 +229,11 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) hlcomprthresh->setValue (pp->toneCurve.hlcomprthresh); shcompr->setValue (pp->toneCurve.shcompr); - if (!black->getAddMode()) { + if (!black->getAddMode() && !batchMode) { shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect } - if (!hlcompr->getAddMode()) { + if (!hlcompr->getAddMode() && !batchMode) { hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect } @@ -615,7 +615,7 @@ void ToneCurve::adjusterChanged (Adjuster* a, double newval) } else if (a == black) { listener->panelChanged (EvBlack, costr); - if (!black->getAddMode()) { + if (!black->getAddMode() && !batchMode) { shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect } } else if (a == contrast) { @@ -625,7 +625,7 @@ void ToneCurve::adjusterChanged (Adjuster* a, double newval) } else if (a == hlcompr) { listener->panelChanged (EvHLCompr, costr); - if (!hlcompr->getAddMode()) { + if (!hlcompr->getAddMode() && !batchMode) { hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect } } else if (a == hlcomprthresh) { @@ -668,11 +668,11 @@ void ToneCurve::neutral_pressed () hlrbox->hide(); } - if (!black->getAddMode()) { + if (!black->getAddMode() && !batchMode) { shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect } - if (!hlcompr->getAddMode()) { + if (!hlcompr->getAddMode() && !batchMode) { hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect } @@ -745,6 +745,11 @@ void ToneCurve::autolevels_toggled () if (!black->getAddMode()) { shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect } + + if (!hlcompr->getAddMode() && !batchMode) { + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + } + } else { listener->panelChanged (EvFixedExp, M("GENERAL_DISABLED")); } @@ -859,9 +864,13 @@ bool ToneCurve::autoExpComputed_ () hlrbox->hide(); } - if (!black->getAddMode()) { + if (!black->getAddMode() && !batchMode) { shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect } + + if (!hlcompr->getAddMode() && !batchMode) { + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + } enableListener (); @@ -983,9 +992,13 @@ bool ToneCurve::histmatchingComputed() contrast->setValue(0); black->setValue(0); - if (!black->getAddMode()) { + if (!black->getAddMode() && !batchMode) { shcompr->set_sensitive(!((int)black->getValue() == 0)); } + + if (!hlcompr->getAddMode() && !batchMode) { + hlcomprthresh->set_sensitive(!((int)hlcompr->getValue () == 0)); //at hlcompr=0 hlcomprthresh value has no effect + } if (autolevels->get_active() ) { expcomp->setValue(0);