fix(cpn): moving lua script functions (#5616)
This commit is contained in:
@@ -354,10 +354,6 @@ void CustomFunctionsPanel::functionEdited()
|
|||||||
functions[index].swtch = swtch;
|
functions[index].swtch = swtch;
|
||||||
functions[index].func = (AssignFunc)fswtchFunc[index]->currentData().toInt();
|
functions[index].func = (AssignFunc)fswtchFunc[index]->currentData().toInt();
|
||||||
functions[index].enabled = true;
|
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)
|
if (functions[index].func == FuncLogs)
|
||||||
functions[index].param = 10; // 1 sec
|
functions[index].param = 10; // 1 sec
|
||||||
refreshCustomFunction(index);
|
refreshCustomFunction(index);
|
||||||
@@ -477,6 +473,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
|
|||||||
if (modified)
|
if (modified)
|
||||||
cfn.repeatParam = fswtchRepeat[i]->currentData().toInt();
|
cfn.repeatParam = fswtchRepeat[i]->currentData().toInt();
|
||||||
widgetsMask |= CUSTOM_FUNCTION_REPEAT;
|
widgetsMask |= CUSTOM_FUNCTION_REPEAT;
|
||||||
|
fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatId));
|
||||||
fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam));
|
fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam));
|
||||||
}
|
}
|
||||||
if (func == FuncPlayValue) {
|
if (func == FuncPlayValue) {
|
||||||
@@ -573,6 +570,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
|
|||||||
cfn.repeatParam = fswtchRepeat[i]->currentData().toInt();
|
cfn.repeatParam = fswtchRepeat[i]->currentData().toInt();
|
||||||
}
|
}
|
||||||
Helpers::populateFileComboBox(fswtchParamArmT[i], scriptsSet, cfn.paramarm);
|
Helpers::populateFileComboBox(fswtchParamArmT[i], scriptsSet, cfn.paramarm);
|
||||||
|
fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatLuaId));
|
||||||
fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam));
|
fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user