labgrid: clamp values to ensure they are within the display of the GUI
This commit is contained in:
parent
d8bf532e47
commit
80d91d86fd
@ -74,10 +74,12 @@ void LabGrid::getParams(double &la, double &lb, double &ha, double &hb) const
|
|||||||
|
|
||||||
void LabGrid::setParams(double la, double lb, double ha, double hb, bool notify)
|
void LabGrid::setParams(double la, double lb, double ha, double hb, bool notify)
|
||||||
{
|
{
|
||||||
low_a = la;
|
const double lo = -rtengine::ColorToningParams::LABGRID_CORR_MAX;
|
||||||
low_b = lb;
|
const double hi = rtengine::ColorToningParams::LABGRID_CORR_MAX;
|
||||||
high_a = ha;
|
low_a = rtengine::LIM(la, lo, hi);
|
||||||
high_b = hb;
|
low_b = rtengine::LIM(lb, lo, hi);
|
||||||
|
high_a = rtengine::LIM(ha, lo, hi);
|
||||||
|
high_b = rtengine::LIM(hb, lo, hi);
|
||||||
queue_draw();
|
queue_draw();
|
||||||
if (notify) {
|
if (notify) {
|
||||||
notifyListener();
|
notifyListener();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user