Browse Source

Put torrents with no ratio limit at the bottom

adaptive-webui-19844
Gabriele 10 years ago
parent
commit
f02db79c52
  1. 9
      src/gui/transferlistsortmodel.cpp

9
src/gui/transferlistsortmodel.cpp

@ -227,6 +227,15 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex @@ -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…
Cancel
Save