mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Fix sorting by queue.
This commit is contained in:
parent
a22137e06e
commit
9032808112
1 changed files with 6 additions and 2 deletions
|
@ -196,8 +196,12 @@ bool TransferListSortModel::lowerPositionThan(const QModelIndex &left, const QMo
|
||||||
// Sort according to TR_PRIORITY
|
// Sort according to TR_PRIORITY
|
||||||
const int queueL = model->data(model->index(left.row(), TorrentModelItem::TR_PRIORITY)).toInt();
|
const int queueL = model->data(model->index(left.row(), TorrentModelItem::TR_PRIORITY)).toInt();
|
||||||
const int queueR = model->data(model->index(right.row(), TorrentModelItem::TR_PRIORITY)).toInt();
|
const int queueR = model->data(model->index(right.row(), TorrentModelItem::TR_PRIORITY)).toInt();
|
||||||
if ((queueL > 0) || (queueR > 0))
|
if ((queueL > 0) || (queueR > 0)) {
|
||||||
|
if ((queueL > 0) && (queueR > 0))
|
||||||
return queueL < queueR;
|
return queueL < queueR;
|
||||||
|
else
|
||||||
|
return queueL != 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Sort according to TR_SEED_DATE
|
// Sort according to TR_SEED_DATE
|
||||||
const QDateTime dateL = model->data(model->index(left.row(), TorrentModelItem::TR_SEED_DATE)).toDateTime();
|
const QDateTime dateL = model->data(model->index(left.row(), TorrentModelItem::TR_SEED_DATE)).toDateTime();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue