src/documentmanager.cpp

changeset 1264
5f00dfde4901
parent 1263
0256edecda54
child 1288
d1e45f90654b
--- a/src/documentmanager.cpp	Sat Mar 03 17:47:40 2018 +0200
+++ b/src/documentmanager.cpp	Sat Mar 03 17:52:40 2018 +0200
@@ -132,10 +132,14 @@
 
 	for (LDObject* obj : file->objects())
 	{
-		if (obj->type() != LDObjectType::Error or static_cast<LDError*> (obj)->fileReferenced().isEmpty())
-			continue;
+		if (obj->type() == LDObjectType::SubfileReference)
+		{
+			LDSubfileReference* reference = static_cast<LDSubfileReference*>(obj);
+			LDDocument* document = reference->fileInfo(this);
 
-		unknowns << static_cast<LDError*> (obj)->fileReferenced();
+			if (document == nullptr)
+				unknowns << reference->referenceName();
+		}
 	}
 
 	if (m_config->tryDownloadMissingFiles() and not unknowns.isEmpty())

mercurial