From b80843c60214a854e44b130b84d573a745495d68 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 25 Nov 2009 18:20:42 +0000 Subject: [PATCH] - Scroll to current torrent when it changes (Transfer list) --- src/transferlistwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index 9b69cf87c..c11166acc 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -328,11 +328,11 @@ int TransferListWidget::updateTorrent(int row) { if(h.is_seed()) { 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 { 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_ETA), QVariant((qlonglong)-1)); @@ -1074,6 +1074,8 @@ void TransferListWidget::currentChanged(const QModelIndex& current, const QModel if(current.isValid()) { int row = proxyModel->mapToSource(current).row(); h = BTSession->getTorrentHandle(getHashFromRow(row)); + // Scroll Fix + scrollTo(current); } emit currentTorrentChanged(h); }