From c8eebe5d77203022a28881034350315c858bc274 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Thu, 24 Dec 2020 12:10:47 -0800 Subject: [PATCH] Detect files that have Name or Author on the first line. Fixes #568. --- common/lc_model.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/lc_model.cpp b/common/lc_model.cpp index f39ffa53..9c5c1a8e 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -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; }