diff --git a/src/GUI.cpp b/src/GUI.cpp index 38c53ebbb..74a89dc4c 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -551,15 +551,14 @@ void GUI::updateDlList(bool force){ if(systrayIntegration){ myTrayIcon->setToolTip(""+tr("qBittorrent")+"
"+tr("DL speed: %1 KiB/s", "e.g: Download speed: 10 KiB/s").arg(QString(tmp2))+"
"+tr("UP speed: %1 KiB/s", "e.g: Upload speed: 10 KiB/s").arg(QString(tmp))); // tray icon } - if( !force && (isMinimized() || isHidden() || tabs->currentIndex() > 1)){ - // No need to update if qBittorrent DL list is hidden + if(tabs->currentIndex() == 1){ + finishedTorrentTab->updateFinishedList(); return; } - if(tabs->currentIndex()){ - finishedTorrentTab->updateFinishedList(); + if(!force && getCurrentTabIndex() != 0){ + // No need to update if qBittorrent DL list is hidden return; } - Q_ASSERT(tabs->currentIndex() == 0); LCD_UpSpeed->display(tmp); // UP LCD LCD_DownSpeed->display(tmp2); // DL LCD // browse handles @@ -658,6 +657,8 @@ void GUI::updateDlList(bool force){ } unsigned int GUI::getCurrentTabIndex() const{ + if(isMinimized() || isHidden()) + return -1; return tabs->currentIndex(); }