From 200518cc9a0cab982b982e975bf9c567e3cd2b5e Mon Sep 17 00:00:00 2001 From: Neil Horne <15316949+elecpower@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:56:43 +1100 Subject: [PATCH] fix(cpn): moving lua script functions (#5616) --- companion/src/modeledit/customfunctions.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index 2a3000eaa..633b67d0d 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -354,10 +354,6 @@ void CustomFunctionsPanel::functionEdited() functions[index].swtch = swtch; functions[index].func = (AssignFunc)fswtchFunc[index]->currentData().toInt(); functions[index].enabled = true; - if (functions[index].func == FuncPlayScript || functions[index].func == FuncRGBLed) - fswtchRepeat[index]->setModel(tabModelFactory->getItemModel(repeatLuaId)); - else - fswtchRepeat[index]->setModel(tabModelFactory->getItemModel(repeatId)); if (functions[index].func == FuncLogs) functions[index].param = 10; // 1 sec refreshCustomFunction(index); @@ -477,6 +473,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) if (modified) cfn.repeatParam = fswtchRepeat[i]->currentData().toInt(); widgetsMask |= CUSTOM_FUNCTION_REPEAT; + fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatId)); fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam)); } if (func == FuncPlayValue) { @@ -573,6 +570,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) cfn.repeatParam = fswtchRepeat[i]->currentData().toInt(); } Helpers::populateFileComboBox(fswtchParamArmT[i], scriptsSet, cfn.paramarm); + fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatLuaId)); fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam)); } else {