mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-13 08:17:57 +00:00
Fix open path won't work correctly
Previously, if double click on the Size number in torrent content tab the path would be an incorrect value and as such open path functionality won't work, this commit fixes it.
This commit is contained in:
parent
307ca61c86
commit
eb1a3e2b29
@ -545,8 +545,9 @@ void PropertiesWidget::openFolder(const QModelIndex &index, const bool containin
|
||||
// FOLDER
|
||||
if (m_propListModel->itemType(index) == TorrentContentModelItem::FolderType) {
|
||||
// Generate relative path to selected folder
|
||||
QStringList pathItems {index.data().toString()};
|
||||
QModelIndex parent = m_propListModel->parent(index);
|
||||
const QModelIndex nameIndex {index.sibling(index.row(), TorrentContentModelItem::COL_NAME)};
|
||||
QStringList pathItems {nameIndex.data().toString()};
|
||||
QModelIndex parent = m_propListModel->parent(nameIndex);
|
||||
while (parent.isValid()) {
|
||||
pathItems.prepend(parent.data().toString());
|
||||
parent = m_propListModel->parent(parent);
|
||||
|
Loading…
Reference in New Issue
Block a user