Browse Source

Fix torrent renaming (3715e8d2 regression).

adaptive-webui-19844
Vladimir Golovnev (Glassez) 10 years ago
parent
commit
347832d852
  1. 2
      src/gui/transferlistwidget.cpp

2
src/gui/transferlistwidget.cpp

@ -649,7 +649,7 @@ void TransferListWidget::renameSelectedTorrent()
const QModelIndexList selectedIndexes = selectionModel()->selectedRows(); const QModelIndexList selectedIndexes = selectionModel()->selectedRows();
if (selectedIndexes.size() != 1) return; if (selectedIndexes.size() != 1) return;
if (!selectedIndexes.first().isValid()) return; if (!selectedIndexes.first().isValid()) return;
QModelIndex mi = mapToSource(selectedIndexes.first()); QModelIndex mi = listModel->index(mapToSource(selectedIndexes.first()).row(), TorrentModelItem::TR_NAME);
const QString hash = getHashFromRow(mi.row()); const QString hash = getHashFromRow(mi.row());
BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(hash); BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(hash);
if (!torrent) return; if (!torrent) return;

Loading…
Cancel
Save