Detect files that have Name or Author on the first line. Fixes #568.

This commit is contained in:
Leonardo Zide 2020-12-24 12:10:47 -08:00
parent b79ae5cc2c
commit c8eebe5d77

View file

@ -70,13 +70,6 @@ bool lcModelProperties::ParseLDrawHeader(QString Line, bool FirstLine)
if (Token == QLatin1String("!LEOCAD"))
return false;
if (FirstLine)
{
LineStream.seek(StartPos);
mDescription = LineStream.readLine().mid(1);
return true;
}
if (Token == QLatin1String("Name:"))
{
mModelName = LineStream.readLine().mid(1);
@ -89,6 +82,13 @@ bool lcModelProperties::ParseLDrawHeader(QString Line, bool FirstLine)
return true;
}
if (FirstLine)
{
LineStream.seek(StartPos);
mDescription = LineStream.readLine().mid(1);
return true;
}
return false;
}