fix: Write model name into models.yml when duplicating model (#2224)

* Update model name in the models.yml file (#2214)

* Fix the length of the name.
This commit is contained in:
eshifri
2022-08-26 12:47:53 +10:00
committed by GitHub
parent e97f23a305
commit 4b747caff9
4 changed files with 13 additions and 10 deletions
+2 -2
View File
@@ -79,9 +79,9 @@ void storageCreateModelsList()
ModelsCategory* cat = modelslist.createCategory(DEFAULT_CATEGORY, false);
ModelCell* model = nullptr;
if (g_eeGeneral.currModelFilename[0] != '\0') {
model = modelslist.addModel(cat, g_eeGeneral.currModelFilename, false);
model = modelslist.addModel(cat, g_eeGeneral.currModelFilename, nullptr, false);
} else {
model = modelslist.addModel(cat, DEFAULT_MODEL_FILENAME, false);
model = modelslist.addModel(cat, DEFAULT_MODEL_FILENAME, nullptr, false);
}
model->setModelName(g_model.header.name);
modelslist.save();