Browse Source

Merge pull request #3271 from glassez/rename

Fix torrent renaming (3715e8d2 regression).
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
7699b7ce6f
  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