Mark read models as "used"
This commit is contained in:
@@ -246,7 +246,7 @@ bool CategorizedStorageFormat::loadYaml(RadioData & radioData)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
radioData.models.reserve(modelFiles.size());
|
radioData.models.resize(modelFiles.size());
|
||||||
|
|
||||||
int modelIdx = 0;
|
int modelIdx = 0;
|
||||||
for (const auto& mc : modelFiles) {
|
for (const auto& mc : modelFiles) {
|
||||||
@@ -267,11 +267,12 @@ bool CategorizedStorageFormat::loadYaml(RadioData & radioData)
|
|||||||
model.modelIndex = modelIdx;
|
model.modelIndex = modelIdx;
|
||||||
strncpy(model.filename, mc.first.c_str(), sizeof(model.filename)-1);
|
strncpy(model.filename, mc.first.c_str(), sizeof(model.filename)-1);
|
||||||
|
|
||||||
if (!loadModelFromYaml(radioData.models[modelIdx],modelBuffer)) {
|
if (!loadModelFromYaml(model,modelBuffer)) {
|
||||||
setError(tr("Can't load ") + filename);
|
setError(tr("Can't load ") + filename);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.used = true;
|
||||||
modelIdx++;
|
modelIdx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user