[Companion] Fix Special/Global Functions action selector being reset for all lines when one line is deleted/cut/pasted (closes #4825).
This commit is contained in:
@@ -599,9 +599,8 @@ void CustomFunctionsPanel::fswPaste()
|
|||||||
CustomFunctionData *fsw = &functions[selectedFunction];
|
CustomFunctionData *fsw = &functions[selectedFunction];
|
||||||
memcpy(fsw, fswData.constData(), sizeof(CustomFunctionData));
|
memcpy(fsw, fswData.constData(), sizeof(CustomFunctionData));
|
||||||
lock = true;
|
lock = true;
|
||||||
fswtchSwtch[selectedFunction]->setModel(rawSwitchItemModel);
|
|
||||||
fswtchSwtch[selectedFunction]->setCurrentIndex(fswtchSwtch[selectedFunction]->findData(functions[selectedFunction].swtch.toValue()));
|
fswtchSwtch[selectedFunction]->setCurrentIndex(fswtchSwtch[selectedFunction]->findData(functions[selectedFunction].swtch.toValue()));
|
||||||
populateFuncCB(fswtchFunc[selectedFunction], functions[selectedFunction].func);
|
fswtchFunc[selectedFunction]->setCurrentIndex(fswtchFunc[selectedFunction]->findData(functions[selectedFunction].func));
|
||||||
populateGVmodeCB(fswtchGVmode[selectedFunction], functions[selectedFunction].adjustMode);
|
populateGVmodeCB(fswtchGVmode[selectedFunction], functions[selectedFunction].adjustMode);
|
||||||
populateFuncParamCB(fswtchParamT[selectedFunction], functions[selectedFunction].func, functions[selectedFunction].param, functions[selectedFunction].adjustMode);
|
populateFuncParamCB(fswtchParamT[selectedFunction], functions[selectedFunction].func, functions[selectedFunction].param, functions[selectedFunction].adjustMode);
|
||||||
refreshCustomFunction(selectedFunction);
|
refreshCustomFunction(selectedFunction);
|
||||||
@@ -615,9 +614,8 @@ void CustomFunctionsPanel::fswDelete()
|
|||||||
functions[selectedFunction].clear();
|
functions[selectedFunction].clear();
|
||||||
// TODO update switch and func
|
// TODO update switch and func
|
||||||
lock = true;
|
lock = true;
|
||||||
fswtchSwtch[selectedFunction]->setModel(rawSwitchItemModel);
|
|
||||||
fswtchSwtch[selectedFunction]->setCurrentIndex(fswtchSwtch[selectedFunction]->findData(functions[selectedFunction].swtch.toValue()));
|
fswtchSwtch[selectedFunction]->setCurrentIndex(fswtchSwtch[selectedFunction]->findData(functions[selectedFunction].swtch.toValue()));
|
||||||
populateFuncCB(fswtchFunc[selectedFunction], functions[selectedFunction].func);
|
fswtchFunc[selectedFunction]->setCurrentIndex(fswtchFunc[selectedFunction]->findData(functions[selectedFunction].func));
|
||||||
refreshCustomFunction(selectedFunction);
|
refreshCustomFunction(selectedFunction);
|
||||||
lock = false;
|
lock = false;
|
||||||
emit modified();
|
emit modified();
|
||||||
|
|||||||
Reference in New Issue
Block a user