1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 11:29:51 +03:00

Merge pull request #6616 from opentx/3djc/fix-6608

Allow rxnum > max models
This commit is contained in:
3djc 2019-08-13 07:55:09 +02:00 committed by GitHub
commit d014ba424f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -726,7 +726,7 @@ void TreeModel::refresh()
protocol = model.moduleData[j].protocol; protocol = model.moduleData[j].protocol;
// These are the only RXs that allow nominating RX # but changing RX or copying models can leave residual configuration which can cause issues // These are the only RXs that allow nominating RX # but changing RX or copying models can leave residual configuration which can cause issues
// if (protocol == PULSES_PXX_XJT_X16 || protocol == PULSES_PXX_XJT_LR12 || protocol == PULSES_PXX_R9M || protocol == PULSES_DSMX || protocol == PULSES_MULTIMODULE) { // if (protocol == PULSES_PXX_XJT_X16 || protocol == PULSES_PXX_XJT_LR12 || protocol == PULSES_PXX_R9M || protocol == PULSES_DSMX || protocol == PULSES_MULTIMODULE) {
if (!protocol == PULSES_OFF && model.moduleData[j].modelId > 0) { if (protocol != PULSES_OFF && model.moduleData[j].modelId > 0) {
if (!rxs.isEmpty()) { if (!rxs.isEmpty()) {
rxs.append(", "); rxs.append(", ");
} }
@ -735,10 +735,6 @@ void TreeModel::refresh()
if (!isModelIdUnique(mdlidx)) { if (!isModelIdUnique(mdlidx)) {
current->setHighlightRX(true); current->setHighlightRX(true);
} }
ModelData & mdl = radioData->models[mdlidx-1];
if (mdl.isEmpty()) {
current->setHighlightRX(true);
}
} }
} }
current->setData(currentColumn++, rxs); current->setData(currentColumn++, rxs);