mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
- Removed bad assert
- Improved updateDlList function a little
This commit is contained in:
parent
c0e4b0bbff
commit
bd8ec01add
1 changed files with 7 additions and 6 deletions
13
src/GUI.cpp
13
src/GUI.cpp
|
@ -551,15 +551,14 @@ void GUI::updateDlList(bool force){
|
||||||
if(systrayIntegration){
|
if(systrayIntegration){
|
||||||
myTrayIcon->setToolTip("<b>"+tr("qBittorrent")+"</b><br>"+tr("DL speed: %1 KiB/s", "e.g: Download speed: 10 KiB/s").arg(QString(tmp2))+"<br>"+tr("UP speed: %1 KiB/s", "e.g: Upload speed: 10 KiB/s").arg(QString(tmp))); // tray icon
|
myTrayIcon->setToolTip("<b>"+tr("qBittorrent")+"</b><br>"+tr("DL speed: %1 KiB/s", "e.g: Download speed: 10 KiB/s").arg(QString(tmp2))+"<br>"+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)){
|
if(tabs->currentIndex() == 1){
|
||||||
// No need to update if qBittorrent DL list is hidden
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(tabs->currentIndex()){
|
|
||||||
finishedTorrentTab->updateFinishedList();
|
finishedTorrentTab->updateFinishedList();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Q_ASSERT(tabs->currentIndex() == 0);
|
if(!force && getCurrentTabIndex() != 0){
|
||||||
|
// No need to update if qBittorrent DL list is hidden
|
||||||
|
return;
|
||||||
|
}
|
||||||
LCD_UpSpeed->display(tmp); // UP LCD
|
LCD_UpSpeed->display(tmp); // UP LCD
|
||||||
LCD_DownSpeed->display(tmp2); // DL LCD
|
LCD_DownSpeed->display(tmp2); // DL LCD
|
||||||
// browse handles
|
// browse handles
|
||||||
|
@ -658,6 +657,8 @@ void GUI::updateDlList(bool force){
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int GUI::getCurrentTabIndex() const{
|
unsigned int GUI::getCurrentTabIndex() const{
|
||||||
|
if(isMinimized() || isHidden())
|
||||||
|
return -1;
|
||||||
return tabs->currentIndex();
|
return tabs->currentIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue