Fixed cases where a model wasn't creating its piece.

This commit is contained in:
leo 2015-01-05 22:44:05 +00:00
parent 5e69e680c6
commit 7d30c9bc88

View file

@ -23,6 +23,7 @@ Project::Project()
{ {
mModified = false; mModified = false;
mActiveModel = new lcModel(tr("Model #1")); mActiveModel = new lcModel(tr("Model #1"));
mActiveModel->CreatePieceInfo();
mActiveModel->SetSaved(); mActiveModel->SetSaved();
mModels.Add(mActiveModel); mModels.Add(mActiveModel);
} }
@ -123,6 +124,7 @@ void Project::CreateNewModel()
{ {
mModified = true; mModified = true;
lcModel* Model = new lcModel(Name); lcModel* Model = new lcModel(Name);
Model->CreatePieceInfo();
Model->SetSaved(); Model->SetSaved();
mModels.Add(Model); mModels.Add(Model);
SetActiveModel(mModels.GetSize() - 1); SetActiveModel(mModels.GetSize() - 1);
@ -155,6 +157,7 @@ void Project::ShowModelListDialog()
if (!Model) if (!Model)
{ {
Model = new lcModel(it->first); Model = new lcModel(it->first);
Model->CreatePieceInfo();
Model->SetSaved(); Model->SetSaved();
mModified = true; mModified = true;
} }