Priority actions should work only if the tab is displayed

This commit is contained in:
Christophe Dumez 2010-08-15 07:47:33 +00:00
commit b2f98bd059
2 changed files with 12 additions and 2 deletions

View file

@ -742,8 +742,8 @@ void TransferListWidget::decreasePrioSelectedTorrents() {
refreshList();
}
// FIXME: Should work only if the tab is displayed
void TransferListWidget::topPrioSelectedTorrents() {
if(main_window->getCurrentTabWidget() != this) return;
const QStringList hashes = getSelectedTorrentsHashes();
foreach(const QString &hash, hashes) {
QTorrentHandle h = BTSession->getTorrentHandle(hash);
@ -754,8 +754,8 @@ void TransferListWidget::topPrioSelectedTorrents() {
refreshList();
}
// FIXME: Should work only if the tab is displayed
void TransferListWidget::bottomPrioSelectedTorrents() {
if(main_window->getCurrentTabWidget() != this) return;
const QStringList hashes = getSelectedTorrentsHashes();
foreach(const QString &hash, hashes) {
QTorrentHandle h = BTSession->getTorrentHandle(hash);