From 1cacf33e4bed37476a53f28204b90ac94940c832 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sun, 4 Dec 2016 18:12:39 -0800 Subject: [PATCH] Fixed file loading. --- .gitignore | 1 + common/lc_model.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7f15a9d0..23598582 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ Makefile library.bin leocad_plugin_import.cpp *.qm +/uic_wrapper.bat diff --git a/common/lc_model.cpp b/common/lc_model.cpp index 7a2daed1..38ebcaa0 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -488,13 +488,14 @@ void lcModel::LoadLDraw(QIODevice& Device, Project* Project) if (Token == QLatin1String("FILE")) { - if (!mProperties.mName.isEmpty()) + QString Name = LineStream.readAll().trimmed(); + + if (mProperties.mName != Name) { Device.seek(Pos); break; } - mProperties.mName = LineStream.readAll().trimmed(); continue; } else if (Token == QLatin1String("NOFILE"))