diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index af6430b6c..c4ec20063 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -507,7 +507,10 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) cfn.param = (uint8_t)fswtchParamT[i]->currentIndex(); populateFuncParamCB(fswtchParamT[i], func, cfn.param); widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; - } else if (func == FuncSetScreen) { + } + else if (func == FuncSetScreen) { + if (modified) + cfn.param = (uint8_t)fswtchParam[i]->value(); fswtchParam[i]->setDecimals(0); fswtchParam[i]->setMinimum(1); if(model) @@ -515,7 +518,6 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) else fswtchParam[i]->setMaximum(1); fswtchParam[i]->setSingleStep(1); - cfn.param = fswtchParam[i]->value(); fswtchParam[i]->setValue(cfn.param); widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; }