130 // files on the parts tracker. |
130 // files on the parts tracker. |
131 QStringList unknowns; |
131 QStringList unknowns; |
132 |
132 |
133 for (LDObject* obj : file->objects()) |
133 for (LDObject* obj : file->objects()) |
134 { |
134 { |
135 if (obj->type() != LDObjectType::Error or static_cast<LDError*> (obj)->fileReferenced().isEmpty()) |
135 if (obj->type() == LDObjectType::SubfileReference) |
136 continue; |
136 { |
137 |
137 LDSubfileReference* reference = static_cast<LDSubfileReference*>(obj); |
138 unknowns << static_cast<LDError*> (obj)->fileReferenced(); |
138 LDDocument* document = reference->fileInfo(this); |
|
139 |
|
140 if (document == nullptr) |
|
141 unknowns << reference->referenceName(); |
|
142 } |
139 } |
143 } |
140 |
144 |
141 if (m_config->tryDownloadMissingFiles() and not unknowns.isEmpty()) |
145 if (m_config->tryDownloadMissingFiles() and not unknowns.isEmpty()) |
142 { |
146 { |
143 PartDownloader dl (m_window); |
147 PartDownloader dl (m_window); |