mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 13:58:51 +03:00
- Increase/decrease priority buttons should now work for finishedTab too
This commit is contained in:
parent
20ae3d997c
commit
27a71ba123
1 changed files with 14 additions and 8 deletions
22
src/GUI.cpp
22
src/GUI.cpp
|
@ -1239,8 +1239,6 @@ void GUI::on_actionIncreasePriority_triggered() {
|
|||
if(tabs->currentIndex() > 1) return;
|
||||
if(tabs->currentIndex() == 1)
|
||||
inDownloadList = false;
|
||||
if(!inDownloadList)
|
||||
return;
|
||||
QStringList hashes;
|
||||
if(inDownloadList) {
|
||||
hashes = downloadingTorrentTab->getSelectedTorrents();
|
||||
|
@ -1248,8 +1246,13 @@ void GUI::on_actionIncreasePriority_triggered() {
|
|||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
}
|
||||
foreach(QString hash, hashes) {
|
||||
BTSession->increaseDlTorrentPriority(hash);
|
||||
downloadingTorrentTab->updateDlList();
|
||||
if(inDownloadList) {
|
||||
BTSession->increaseDlTorrentPriority(hash);
|
||||
downloadingTorrentTab->updateDlList();
|
||||
} else {
|
||||
BTSession->increaseUpTorrentPriority(hash);
|
||||
finishedTorrentTab->updateFinishedList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1258,8 +1261,6 @@ void GUI::on_actionDecreasePriority_triggered() {
|
|||
if(tabs->currentIndex() > 1) return;
|
||||
if(tabs->currentIndex() == 1)
|
||||
inDownloadList = false;
|
||||
if(!inDownloadList)
|
||||
return;
|
||||
QStringList hashes;
|
||||
if(inDownloadList) {
|
||||
hashes = downloadingTorrentTab->getSelectedTorrents();
|
||||
|
@ -1268,8 +1269,13 @@ void GUI::on_actionDecreasePriority_triggered() {
|
|||
}
|
||||
QString hash;
|
||||
foreach(QString hash, hashes) {
|
||||
BTSession->decreaseDlTorrentPriority(hash);
|
||||
downloadingTorrentTab->updateDlList();
|
||||
if(inDownloadList) {
|
||||
BTSession->decreaseDlTorrentPriority(hash);
|
||||
downloadingTorrentTab->updateDlList();
|
||||
} else {
|
||||
BTSession->decreaseUpTorrentPriority(hash);
|
||||
finishedTorrentTab->updateFinishedList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue