From 00ce592bbd0692b2c8989437324237ea587b5ecb Mon Sep 17 00:00:00 2001 From: Rory Jaffe Date: Tue, 11 Jan 2022 17:10:05 -0800 Subject: [PATCH] stop double addition --- src/plugin/Profiles.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugin/Profiles.lua b/src/plugin/Profiles.lua index ee1f7b9a3..4c0e648b1 100644 --- a/src/plugin/Profiles.lua +++ b/src/plugin/Profiles.lua @@ -79,7 +79,11 @@ local function doprofilechange(newprofile) if altparam == 'Direct' then lrvalue = LrDevelopController.getValue(param) else - lrvalue = (photoval[param] or 0) + (photoval[altparam] or 0) + if param == altparam then + lrvalue = (photoval[param] or 0) + else + lrvalue = (photoval[param] or 0) + (photoval[altparam] or 0) + end end if type(min) == 'number' and type(max) == 'number' and type(lrvalue) == 'number' then local midivalue = (lrvalue-min)/(max-min)