1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-03-12 05:11:24 +00:00

Allow setting priority for partially downloaded multi-file torrent

Currently you can't directly change the priority of a partially completed multi file torrent. You'll have to start downloading those files and then change their priority.

Closes #10994.
Closes #8673.
PR #16546.
This commit is contained in:
An0n 2022-03-01 10:53:39 +06:00 committed by GitHub
parent 63812ca951
commit c2af5c6a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 65 deletions

View File

@ -655,8 +655,6 @@ void PropertiesWidget::displayFilesListMenu()
menu->addSeparator(); menu->addSeparator();
} }
if (!m_torrent->isSeed())
{
const auto applyPriorities = [this](const BitTorrent::DownloadPriority prio) const auto applyPriorities = [this](const BitTorrent::DownloadPriority prio)
{ {
const QModelIndexList selectedRows = m_ui->filesList->selectionModel()->selectedRows(0); const QModelIndexList selectedRows = m_ui->filesList->selectionModel()->selectedRows(0);
@ -725,7 +723,6 @@ void PropertiesWidget::displayFilesListMenu()
this->applyPriorities(); this->applyPriorities();
} }
}); });
}
// The selected torrent might have disappeared during exec() // The selected torrent might have disappeared during exec()
// so we just close menu when an appropriate model is reset // so we just close menu when an appropriate model is reset

View File

@ -77,7 +77,7 @@ QWidget *PropListDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
if (m_properties) if (m_properties)
{ {
const BitTorrent::Torrent *torrent = m_properties->getCurrentTorrent(); const BitTorrent::Torrent *torrent = m_properties->getCurrentTorrent();
if (!torrent || !torrent->hasMetadata() || torrent->isSeed()) if (!torrent || !torrent->hasMetadata())
return nullptr; return nullptr;
} }