Fix grouping models by category

This commit is contained in:
elecpower
2021-12-31 10:53:11 +01:00
committed by Raphael Coeffic
parent 44146f1e4f
commit 5d8947f19f
+4 -3
View File
@@ -263,15 +263,16 @@ bool CategorizedStorageFormat::loadYaml(RadioData & radioData)
// ModelData() use memset to clear everything to 0
//
auto& model = radioData.models[modelIdx];
model.category = mc.second;
model.modelIndex = modelIdx;
strncpy(model.filename, mc.first.c_str(), sizeof(model.filename)-1);
if (!loadModelFromYaml(model,modelBuffer)) {
setError(tr("Can't load ") + filename);
return false;
}
model.category = mc.second;
model.modelIndex = modelIdx;
strncpy(model.filename, mc.first.c_str(), sizeof(model.filename)-1);
model.used = true;
modelIdx++;
}