fix(cpn): global customisable switch type has no group (#7326)

This commit is contained in:
Neil Horne
2026-04-29 21:03:30 +10:00
committed by GitHub
parent 559866c059
commit dee5ff3238
@@ -296,6 +296,10 @@ void FunctionSwitchesPanel::on_configCurrentIndexChanged(int index)
if ((config == Board::SWITCH_NOT_AVAILABLE) || model->getFuncSwitchAlwaysOnGroupForSwitch(sw))
model->setFuncSwitchGroup(sw, 0);
}
if (config == Board::SWITCH_GLOBAL) {
model->setFuncSwitchStart(sw, ModelData::FUNC_SWITCH_START_OFF);
model->setFuncSwitchGroup(sw, 0);
}
update();
emit modified();
emit updateDataModels();