feat: special function to push customisable switches (#5497)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com> Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
co-authored by
philmoz
elecpower
parent
40449bf730
commit
d417228677
@@ -194,9 +194,10 @@ QString RawSource::toString(const ModelData * model, const GeneralSettings * con
|
||||
case SOURCE_TYPE_SWITCH:
|
||||
dfltName = Boards::getSwitchInfo(index - 1, board).name.c_str();
|
||||
if (Boards::isSwitchFunc(index - 1, board)) {
|
||||
if (model && index <= CPN_MAX_SWITCHES_FUNCTION) {
|
||||
if (model) {
|
||||
int fsindex = Boards::getSwitchTagNum(index - 1, board) - 1;
|
||||
custName = QString(model->functionSwitchNames[fsindex]).trimmed();
|
||||
if (fsindex >= 0 && fsindex < CPN_MAX_SWITCHES_FUNCTION)
|
||||
custName = QString(model->functionSwitchNames[fsindex]).trimmed();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user