src/partDownloader.cpp

changeset 978
4603d8fd063e
parent 971
c00f9665a9f8
child 981
5d5d84ab2c48
--- a/src/partDownloader.cpp	Mon Aug 31 23:36:08 2015 +0300
+++ b/src/partDownloader.cpp	Sat Sep 05 23:03:24 2015 +0300
@@ -269,7 +269,7 @@
 //
 void PartDownloader::downloadFile (QString dest, QString url, bool primary)
 {
-	const int row = form()->progress->rowCount();
+	int row = form()->progress->rowCount();
 
 	// Don't download files repeadetly.
 	if (filesToDownload().indexOf (dest) != -1)
@@ -312,7 +312,7 @@
 		if (not req->isFinished())
 			return;
 
-        if (req->state() == PartDownloadRequest::State::Failed)
+		if (req->state() == PartDownloadRequest::State::Failed)
 			failed = true;
 	}
 
@@ -324,12 +324,12 @@
 	// Update everything now
 	if (primaryFile() != null)
 	{
-		LDDocument::setCurrent (primaryFile());
+		g_win->changeDocument (primaryFile());
 		g_win->doFullRefresh();
 		g_win->R()->resetAngles();
 	}
 
-		for (LDDocument* f : m_files)
+	for (LDDocument* f : m_files)
 		f->reloadAllSubfiles();
 
 	if (m_config->autoCloseDownloadDialog() and not failed)

mercurial