fix: Show default names in Companion if switch/source names only spaces (#1524)

This commit is contained in:
Neil Horne
2022-01-30 19:06:21 +10:00
committed by GitHub
parent b865448752
commit 8158a8924d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ QString RawSwitch::toString(Board::Type board, const GeneralSettings * const gen
if (IS_HORUS_OR_TARANIS(board)) {
qr = div(index-1, 3);
if (generalSettings)
swName = QString(generalSettings->switchName[qr.quot]);
swName = QString(generalSettings->switchName[qr.quot]).trimmed();
if (swName.isEmpty())
swName = Boards::getSwitchInfo(board, qr.quot).name;
return swName + directionIndicators.at(qr.rem > -1 && qr.rem < directionIndicators.size() ? qr.rem : 1);