Browse Source

- Make sure the torrent is not already in the list before trying to add it

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
68092f3b5c
  1. 3
      src/transferlistwidget.cpp

3
src/transferlistwidget.cpp

@ -138,6 +138,9 @@ TransferListWidget::~TransferListWidget() { @@ -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

Loading…
Cancel
Save