mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Fix torrent renaming. Closes #3398
This commit is contained in:
@@ -684,7 +684,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());
|
||||||
const QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
const QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
if (!h.is_valid()) return;
|
if (!h.is_valid()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user