267 |
267 |
268 // ============================================================================= |
268 // ============================================================================= |
269 // |
269 // |
270 void PartDownloader::downloadFile (QString dest, QString url, bool primary) |
270 void PartDownloader::downloadFile (QString dest, QString url, bool primary) |
271 { |
271 { |
272 const int row = form()->progress->rowCount(); |
272 int row = form()->progress->rowCount(); |
273 |
273 |
274 // Don't download files repeadetly. |
274 // Don't download files repeadetly. |
275 if (filesToDownload().indexOf (dest) != -1) |
275 if (filesToDownload().indexOf (dest) != -1) |
276 return; |
276 return; |
277 |
277 |
322 m_requests.clear(); |
322 m_requests.clear(); |
323 |
323 |
324 // Update everything now |
324 // Update everything now |
325 if (primaryFile() != null) |
325 if (primaryFile() != null) |
326 { |
326 { |
327 LDDocument::setCurrent (primaryFile()); |
327 g_win->changeDocument (primaryFile()); |
328 g_win->doFullRefresh(); |
328 g_win->doFullRefresh(); |
329 g_win->R()->resetAngles(); |
329 g_win->R()->resetAngles(); |
330 } |
330 } |
331 |
331 |
332 for (LDDocument* f : m_files) |
332 for (LDDocument* f : m_files) |
333 f->reloadAllSubfiles(); |
333 f->reloadAllSubfiles(); |
334 |
334 |
335 if (m_config->autoCloseDownloadDialog() and not failed) |
335 if (m_config->autoCloseDownloadDialog() and not failed) |
336 { |
336 { |
337 // Close automatically if desired. |
337 // Close automatically if desired. |