mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Detect files that have Name or Author on the first line. Fixes #568.
This commit is contained in:
parent
b79ae5cc2c
commit
c8eebe5d77
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue