Fixes #4103: SF repeat parameter was not reset when changing function type
This commit is contained in:
@@ -67,7 +67,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model,
|
|||||||
mediaPlayerCurrent(-1),
|
mediaPlayerCurrent(-1),
|
||||||
mediaPlayer(NULL)
|
mediaPlayer(NULL)
|
||||||
{
|
{
|
||||||
Stopwatch s1("CustomFunctionsPanel - populate");
|
Stopwatch s1("CustomFunctionsPanel - populate");
|
||||||
lock = true;
|
lock = true;
|
||||||
int num_fsw = model ? firmware->getCapability(CustomFunctions) : firmware->getCapability(GlobalFunctions);
|
int num_fsw = model ? firmware->getCapability(CustomFunctions) : firmware->getCapability(GlobalFunctions);
|
||||||
|
|
||||||
@@ -337,8 +337,11 @@ void CustomFunctionsPanel::functionEdited()
|
|||||||
if (!lock) {
|
if (!lock) {
|
||||||
lock = true;
|
lock = true;
|
||||||
int index = sender()->property("index").toInt();
|
int index = sender()->property("index").toInt();
|
||||||
fswtchParamArmT[index]->setCurrentIndex(0);
|
RawSwitch swtch = functions[index].swtch;
|
||||||
refreshCustomFunction(index, true);
|
functions[index].clear();
|
||||||
|
functions[index].swtch = swtch;
|
||||||
|
functions[index].func = (AssignFunc)fswtchFunc[index]->itemData(fswtchFunc[index]->currentIndex()).toInt();
|
||||||
|
refreshCustomFunction(index);
|
||||||
emit modified();
|
emit modified();
|
||||||
lock = false;
|
lock = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user