mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Merge pull request #3271 from glassez/rename
Fix torrent renaming (3715e8d2
regression).
This commit is contained in:
commit
7699b7ce6f
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue