- Fixed torrent switching to finished tab

This commit is contained in:
Christophe Dumez
2007-08-26 17:25:37 +00:00
parent 366d5108c4
commit 4e2ebe5a69
3 changed files with 9 additions and 7 deletions

View File

@@ -176,7 +176,10 @@ void DownloadingTorrents::resumeTorrent(QString hash){
// Remove a torrent from the download list but NOT from the BT Session
void DownloadingTorrents::deleteTorrent(QString hash) {
int row = getRowFromHash(hash);
Q_ASSERT(row != -1);
if(row == -1){
qDebug("torrent is not in download list, nothing to delete");
return;
}
DLListModel->removeRow(row);
--nbTorrents;
emit unfinishedTorrentsNumberChanged(nbTorrents);