Browse Source

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.
adaptive-webui-19844
An0n 3 years ago committed by GitHub
parent
commit
c2af5c6a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/gui/properties/propertieswidget.cpp
  2. 2
      src/gui/properties/proplistdelegate.cpp

3
src/gui/properties/propertieswidget.cpp

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

2
src/gui/properties/proplistdelegate.cpp

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

Loading…
Cancel
Save