Browse Source

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.
adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
eb1a3e2b29
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 5
      src/gui/properties/propertieswidget.cpp

5
src/gui/properties/propertieswidget.cpp

@ -545,8 +545,9 @@ void PropertiesWidget::openFolder(const QModelIndex &index, const bool containin
// FOLDER // FOLDER
if (m_propListModel->itemType(index) == TorrentContentModelItem::FolderType) { if (m_propListModel->itemType(index) == TorrentContentModelItem::FolderType) {
// Generate relative path to selected folder // Generate relative path to selected folder
QStringList pathItems {index.data().toString()}; const QModelIndex nameIndex {index.sibling(index.row(), TorrentContentModelItem::COL_NAME)};
QModelIndex parent = m_propListModel->parent(index); QStringList pathItems {nameIndex.data().toString()};
QModelIndex parent = m_propListModel->parent(nameIndex);
while (parent.isValid()) { while (parent.isValid()) {
pathItems.prepend(parent.data().toString()); pathItems.prepend(parent.data().toString());
parent = m_propListModel->parent(parent); parent = m_propListModel->parent(parent);

Loading…
Cancel
Save