Skip to content

Commit

Permalink
disabled sliders R G B when dehaze enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Desmis committed Sep 10, 2024
1 parent d23a066 commit dd92c41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
13 changes: 12 additions & 1 deletion rtgui/bayerrawexposure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void BayerRAWExposure::read(const rtengine::procparams::ProcParams* pp, const Pa
} else {
PexBlack3->setValue (PexBlack0->getValue());
}

checkBoxToggled (Dehablack, CheckValue::on);
enableListener ();
}

Expand Down Expand Up @@ -209,6 +209,17 @@ void BayerRAWExposure::checkBoxToggled (CheckBox* c, CheckValue newval)
}
}
} else if(c == Dehablack) {
if(Dehablack->getLastActive()) {
PexBlack1->set_sensitive(false);
PexBlack2->set_sensitive(false);
PexBlack3->set_sensitive(false);
PexBlack0->set_sensitive(false);
} else {
PexBlack1->set_sensitive(true);
PexBlack2->set_sensitive(true);
PexBlack3->set_sensitive(true);
PexBlack0->set_sensitive(true);
}
if (listener) {
listener->panelChanged (EvDehablack, Dehablack->getLastActive() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
}
Expand Down
10 changes: 10 additions & 0 deletions rtgui/xtransrawexposure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ void XTransRAWExposure::read(const rtengine::procparams::ProcParams* pp, const P
PexBlackRed->setValue (pp->raw.xtranssensor.blackred);//black
PexBlackGreen->setValue (pp->raw.xtranssensor.blackgreen);//black
PexBlackBlue->setValue (pp->raw.xtranssensor.blackblue);//black
checkBoxToggled (Dehablackx, CheckValue::on);

enableListener ();
}
Expand Down Expand Up @@ -153,6 +154,15 @@ void XTransRAWExposure::adjusterChanged(Adjuster* a, double newval)
void XTransRAWExposure::checkBoxToggled (CheckBox* c, CheckValue newval)
{
if(c == Dehablackx) {
if(Dehablackx->getLastActive()) {
PexBlackRed->set_sensitive(false);
PexBlackGreen->set_sensitive(false);
PexBlackBlue->set_sensitive(false);
} else {
PexBlackRed->set_sensitive(true);
PexBlackGreen->set_sensitive(true);
PexBlackBlue->set_sensitive(true);
}
if (listener) {
listener->panelChanged (EvDehablackx, Dehablackx->getLastActive() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
}
Expand Down

0 comments on commit dd92c41

Please sign in to comment.