src/ldDocument.cpp

changeset 993
23436e487f0c
parent 988
ac4a2ae54f76
child 994
09e1a3e272ec
--- a/src/ldDocument.cpp	Sun Sep 06 16:08:22 2015 +0300
+++ b/src/ldDocument.cpp	Sun Sep 06 16:42:57 2015 +0300
@@ -583,20 +583,16 @@
 
 	if (g_win->configBag()->tryDownloadMissingFiles() and not unknowns.isEmpty())
 	{
-		PartDownloader dl;
-
-		if (dl.checkValidPath())
-		{
-			dl.setSource (PartDownloader::PartsTracker);
-			dl.setPrimaryFile (file);
+		PartDownloader dl (g_win);
+		dl.setSourceType (PartDownloader::PartsTracker);
+		dl.setPrimaryFile (file);
 
-			for (QString const& unknown : unknowns)
-				dl.downloadFromPartsTracker (unknown);
+		for (QString const& unknown : unknowns)
+			dl.downloadFromPartsTracker (unknown);
 
-			dl.exec();
-			dl.checkIfFinished();
-			file->reloadAllSubfiles();
-		}
+		dl.exec();
+		dl.checkIfFinished();
+		file->reloadAllSubfiles();
 	}
 }
 

mercurial