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
+4 -1
View File
@@ -334,7 +334,10 @@ class ModelCategoryPageBody : public FormWindow
{
return [=]() {
storageCheck(true);
modelslist.setCurrentModel(modelslist.addModel(category, createModel()));
auto model = modelslist.addModel(category, createModel(), false);
model->setModelName(g_model.header.name);
modelslist.setCurrentModel(model);
modelslist.save();
update(category->size() - 1);
};
}