1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Better display of inputs with assigned name

This commit is contained in:
Damjan Adamic 2014-04-30 23:16:49 +02:00
parent 1a6906bbb3
commit 88e7ad4b8c
2 changed files with 7 additions and 4 deletions

View file

@ -63,8 +63,11 @@ QString getInputStr(ModelData & model, int index)
QString result;
if (GetCurrentFirmware()->getCapability(VirtualInputs)) {
result = model.inputNames[index];
if (result.isEmpty()) {
if (strlen(model.inputNames[index]) > 0) {
result = QObject::tr("[I%1]").arg(index+1);
result += QString(model.inputNames[index]);
}
else {
result = QObject::tr("Input%1").arg(index+1, 2, 10, QChar('0'));
}
}

View file

@ -144,7 +144,7 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
if ((dest == 0) || (model.expoData[dest-1].chn != md->chn)) {
if (new_ch) *new_ch = 1;
if (firmware->getCapability(VirtualInputs))
str = QString("%1").arg(getInputStr(model, md->chn), -8, ' ');
str = QString("%1").arg(getInputStr(model, md->chn), -10, ' ');
else
str = getInputStr(model, md->chn);
}