Fixed Auto Levels wrongly turned off, see issue #713
This commit is contained in:
parent
1fd4fddbe3
commit
6cba0608c9
@ -200,14 +200,13 @@ void ToneCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pe
|
|||||||
|
|
||||||
void ToneCurve::curveChanged () {
|
void ToneCurve::curveChanged () {
|
||||||
|
|
||||||
if (listener) {
|
if (listener) listener->panelChanged (EvToneCurve, M("HISTORY_CUSTOMCURVE"));
|
||||||
listener->panelChanged (EvToneCurve, M("HISTORY_CUSTOMCURVE"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToneCurve::adjusterChanged (Adjuster* a, double newval) {
|
void ToneCurve::adjusterChanged (Adjuster* a, double newval) {
|
||||||
|
|
||||||
if (autolevels->get_active() && (a==expcomp || a==black || a==hlcompr || a==hlcomprthresh || a==shcompr)) {
|
// Switch off auto exposure if user changes sliders manually
|
||||||
|
if (autolevels->get_active() && (a==expcomp || a==black)) {
|
||||||
autolevels->set_active (false);
|
autolevels->set_active (false);
|
||||||
autolevels->set_inconsistent (false);
|
autolevels->set_inconsistent (false);
|
||||||
}
|
}
|
||||||
@ -312,10 +311,10 @@ int aexpcomputed (void* data) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToneCurve::autoExpChanged (double br, int bl) {
|
void ToneCurve::autoExpChanged (double expcomp, int black) {
|
||||||
|
|
||||||
nextBl = bl;
|
nextBlack = black;
|
||||||
nextBr = br;
|
nextExpcomp = expcomp;
|
||||||
g_idle_add (aexpcomputed, this);
|
g_idle_add (aexpcomputed, this);
|
||||||
|
|
||||||
// Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::autoExpComputed_));
|
// Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::autoExpComputed_));
|
||||||
@ -339,8 +338,8 @@ bool ToneCurve::autoExpComputed_ () {
|
|||||||
|
|
||||||
disableListener ();
|
disableListener ();
|
||||||
enableAll ();
|
enableAll ();
|
||||||
expcomp->setValue (nextBr);
|
expcomp->setValue (nextExpcomp);
|
||||||
black->setValue (nextBl);
|
black->setValue (nextBlack);
|
||||||
if (!blackAdd) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
if (!blackAdd) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||||
enableListener ();
|
enableListener ();
|
||||||
|
|
||||||
|
@ -45,8 +45,10 @@ class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
|||||||
sigc::connection autoconn;
|
sigc::connection autoconn;
|
||||||
CurveEditorGroup* curveEditorG;
|
CurveEditorGroup* curveEditorG;
|
||||||
DiagonalCurveEditor* shape;
|
DiagonalCurveEditor* shape;
|
||||||
double nextBr;
|
|
||||||
int nextBl;
|
// used temporarily in eventing
|
||||||
|
double nextExpcomp;
|
||||||
|
int nextBlack;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user