mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Fixed empty model being added when loading some MPD files.
This commit is contained in:
parent
5dc511d56a
commit
c9839c945e
1 changed files with 8 additions and 2 deletions
|
@ -216,9 +216,15 @@ bool Project::Load(const QString& FileName)
|
|||
while (!Buffer.atEnd())
|
||||
{
|
||||
lcModel* Model = new lcModel(QString());
|
||||
mModels.Add(Model);
|
||||
Model->LoadLDraw(Buffer, this);
|
||||
Model->SetSaved();
|
||||
|
||||
if (mModels.IsEmpty() || !Model->GetProperties().mName.isEmpty())
|
||||
{
|
||||
mModels.Add(Model);
|
||||
Model->SetSaved();
|
||||
}
|
||||
else
|
||||
delete Model;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue