mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Scroll to current torrent when it changes (Transfer list)
This commit is contained in:
parent
9fa0ff78bc
commit
b80843c602
1 changed files with 4 additions and 2 deletions
|
@ -328,11 +328,11 @@ int TransferListWidget::updateTorrent(int row) {
|
||||||
if(h.is_seed()) {
|
if(h.is_seed()) {
|
||||||
s = STATE_CHECKING_UP;
|
s = STATE_CHECKING_UP;
|
||||||
|
|
||||||
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingUP.png"))), Qt::DecorationRole);
|
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingUP.png"))), Qt::DecorationRole);
|
||||||
} else {
|
} else {
|
||||||
s = STATE_CHECKING_DL;
|
s = STATE_CHECKING_DL;
|
||||||
|
|
||||||
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingDL.png"))), Qt::DecorationRole);
|
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingDL.png"))), Qt::DecorationRole);
|
||||||
}
|
}
|
||||||
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress()));
|
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress()));
|
||||||
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)-1));
|
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)-1));
|
||||||
|
@ -1074,6 +1074,8 @@ void TransferListWidget::currentChanged(const QModelIndex& current, const QModel
|
||||||
if(current.isValid()) {
|
if(current.isValid()) {
|
||||||
int row = proxyModel->mapToSource(current).row();
|
int row = proxyModel->mapToSource(current).row();
|
||||||
h = BTSession->getTorrentHandle(getHashFromRow(row));
|
h = BTSession->getTorrentHandle(getHashFromRow(row));
|
||||||
|
// Scroll Fix
|
||||||
|
scrollTo(current);
|
||||||
}
|
}
|
||||||
emit currentTorrentChanged(h);
|
emit currentTorrentChanged(h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue