Skip to content

Commit

Permalink
fix(cpn): Save "set main view" number for special/global function (#3132
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Neil Horne authored and pfeerick committed Feb 3, 2023
1 parent ea43d07 commit 3f3f741
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions companion/src/modeledit/customfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,17 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
cfn.param = (uint8_t)fswtchParamT[i]->currentIndex();
populateFuncParamCB(fswtchParamT[i], func, cfn.param);
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM;
} else if (func == FuncSetScreen) {
}
else if (func == FuncSetScreen) {
if (modified)
cfn.param = (uint8_t)fswtchParam[i]->value();
fswtchParam[i]->setDecimals(0);
fswtchParam[i]->setMinimum(1);
if(model)
fswtchParam[i]->setMaximum(model->getCustomScreensCount());
else
fswtchParam[i]->setMaximum(1);
fswtchParam[i]->setSingleStep(1);
cfn.param = fswtchParam[i]->value();
fswtchParam[i]->setValue(cfn.param);
widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM;
}
Expand Down

0 comments on commit 3f3f741

Please sign in to comment.