mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Make setSequentialDownload/setFirstLastPiecePriority independent.
This commit is contained in:
parent
88abe2baff
commit
67e90d8d2a
4 changed files with 23 additions and 24 deletions
|
@ -450,7 +450,7 @@ void PropertiesWidget::loadDynamicData() {
|
|||
downloaded_pieces->setProgress(m_torrent->pieces(), m_torrent->downloadingPieces());
|
||||
}
|
||||
else {
|
||||
showPiecesAvailability(false);
|
||||
showPiecesAvailability(false);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -840,14 +840,9 @@ void PropertiesWidget::editWebSeed() {
|
|||
bool PropertiesWidget::applyPriorities() {
|
||||
qDebug("Saving files priorities");
|
||||
const QVector<int> priorities = PropListModel->model()->getFilePriorities();
|
||||
// Save first/last piece first option state
|
||||
bool first_last_piece_first = m_torrent->hasFirstLastPiecePriority();
|
||||
// Prioritize the files
|
||||
qDebug("prioritize files: %d", priorities[0]);
|
||||
m_torrent->prioritizeFiles(priorities);
|
||||
// Restore first/last piece first option if necessary
|
||||
if (first_last_piece_first)
|
||||
m_torrent->setFirstLastPiecePriority(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue