From 68092f3b5c32befec7d83cd614626171dba2fd69 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 23 Nov 2009 14:17:47 +0000 Subject: [PATCH] - Make sure the torrent is not already in the list before trying to add it --- src/transferlistwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index c829e3e50..38bba3ac4 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -138,6 +138,9 @@ TransferListWidget::~TransferListWidget() { void TransferListWidget::addTorrent(QTorrentHandle& h) { if(!h.is_valid()) return; + // Check that the torrent is not already there + if(getRowFromHash(h.hash()) >= 0) return; + // Actuall add the torrent int row = listModel->rowCount(); try { // Adding torrent to transfer list