Sat, 03 Mar 2018 17:52:40 +0200
reimplemented finding of broken document references
src/documentmanager.cpp | file | annotate | diff | comparison | revisions |
--- 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())