1
0
Fork 0
mirror of https://github.com/leozide/leocad synced 2025-02-17 21:33:22 +01:00

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

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