Bsongis/horus create radiodata from scratch (#4251)

[Companion] It's now possible to add models on an empty EEPROM, save and reload the .otx
This commit is contained in:
Bertrand Songis
2017-01-17 19:41:09 +01:00
committed by GitHub
parent 2bca437e55
commit 61d27ebd75
9 changed files with 42 additions and 20 deletions
+3
View File
@@ -57,6 +57,9 @@ bool CategorizedStorageFormat::load(RadioData & radioData)
setError(QObject::tr("Can't extract %1").arg(QString(line)));
return false;
}
if ((int)radioData.models.size() <= modelIndex) {
radioData.models.resize(modelIndex + 1);
}
if (!loadModelFromByteArray(radioData.models[modelIndex], modelBuffer)) {
return false;
}