From f9b7f567c3f3893b573b211b5bca6f43ba6dfa5c Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Sun, 23 Apr 2017 21:09:00 -0400 Subject: [PATCH] [Companion] Fix Special/Global Functions action selector being reset for all lines when one line is deleted/cut/pasted (closes #4825). --- 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 26e618ac9..514ea01d0 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -599,9 +599,8 @@ void CustomFunctionsPanel::fswPaste() CustomFunctionData *fsw = &functions[selectedFunction]; memcpy(fsw, fswData.constData(), sizeof(CustomFunctionData)); lock = true; - fswtchSwtch[selectedFunction]->setModel(rawSwitchItemModel); 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); populateFuncParamCB(fswtchParamT[selectedFunction], functions[selectedFunction].func, functions[selectedFunction].param, functions[selectedFunction].adjustMode); refreshCustomFunction(selectedFunction); @@ -615,9 +614,8 @@ void CustomFunctionsPanel::fswDelete() functions[selectedFunction].clear(); // TODO update switch and func lock = true; - fswtchSwtch[selectedFunction]->setModel(rawSwitchItemModel); 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); lock = false; emit modified();