mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Put torrents with no ratio limit at the bottom
This commit is contained in:
parent
0a51b57a54
commit
f02db79c52
1 changed files with 9 additions and 0 deletions
|
@ -227,6 +227,15 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
|||
|
||||
return vL < vR;
|
||||
}
|
||||
else if (column == TorrentModelItem::TR_RATIO_LIMIT) {
|
||||
const qreal vL = left.data().toDouble();
|
||||
const qreal vR = right.data().toDouble();
|
||||
|
||||
if (vL == -1) return false;
|
||||
if (vR == -1) return true;
|
||||
|
||||
return vL < vR;
|
||||
}
|
||||
|
||||
return QSortFilterProxyModel::lessThan(left, right);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue