Fix model names and indexes on storage creation

This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:03 +01:00
parent 3717e37e3f
commit bcdb9bd311
5 changed files with 25 additions and 7 deletions
+7 -1
View File
@@ -76,7 +76,13 @@ void storageCreateModelsList()
{
modelslist.clear();
ModelsCategory* cat = modelslist.createCategory(DEFAULT_CATEGORY, false);
cat->addModel(DEFAULT_MODEL_FILENAME);
ModelCell* model = nullptr;
if (g_eeGeneral.currModelFilename[0] != '\0') {
model = modelslist.addModel(cat, g_eeGeneral.currModelFilename, false);
} else {
model = modelslist.addModel(cat, DEFAULT_MODEL_FILENAME, false);
}
model->setModelName(g_model.header.name);
modelslist.save();
}
#endif