From 1e2356b93801e60506e36a928d72261b4de5629c Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 31 Mar 2019 23:29:25 +0200 Subject: [PATCH] Improve curve visibility logic. Automatically open first non linear curve for L*a*b*, RGB and HSV. --- rtgui/hsvequalizer.cc | 2 +- rtgui/labcurve.cc | 14 +++++++------- rtgui/rgbcurves.cc | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rtgui/hsvequalizer.cc b/rtgui/hsvequalizer.cc index 7db76aa9f..f489696d2 100644 --- a/rtgui/hsvequalizer.cc +++ b/rtgui/hsvequalizer.cc @@ -109,7 +109,7 @@ void HSVEqualizer::autoOpenCurve () bool active = hshape->openIfNonlinear(); if (!active) { - sshape->openIfNonlinear(); + active = sshape->openIfNonlinear(); } if (!active) { diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 13ea00b74..f458fa717 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -299,31 +299,31 @@ void LCurve::autoOpenCurve () bool active = lshape->openIfNonlinear(); if (!active) { - ashape->openIfNonlinear(); + active = ashape->openIfNonlinear(); } if (!active) { - bshape->openIfNonlinear(); + active = bshape->openIfNonlinear(); } if (!active) { - ccshape->openIfNonlinear(); + active = ccshape->openIfNonlinear(); } if (!active) { - chshape->openIfNonlinear(); + active = chshape->openIfNonlinear(); } if (!active) { - lhshape->openIfNonlinear(); + active = lhshape->openIfNonlinear(); } if (!active) { - hhshape->openIfNonlinear(); + active = hhshape->openIfNonlinear(); } if (!active) { - lcshape->openIfNonlinear(); + active = lcshape->openIfNonlinear(); } if (!active) { diff --git a/rtgui/rgbcurves.cc b/rtgui/rgbcurves.cc index 75af43508..560ee7e57 100644 --- a/rtgui/rgbcurves.cc +++ b/rtgui/rgbcurves.cc @@ -117,7 +117,7 @@ void RGBCurves::autoOpenCurve () bool active = Rshape->openIfNonlinear(); if (!active) { - Gshape->openIfNonlinear(); + active = Gshape->openIfNonlinear(); } if (!active) {