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 #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"))
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue