Fix scrolling to the lowermost visible torrent

Fixes #3221.
PR #16543.
This commit is contained in:
Aleksandr Cupacenko 2022-03-01 06:49:40 +02:00 committed by GitHub
parent ac97ed685f
commit 98bdfcef65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1178,8 +1178,8 @@ void TransferListWidget::currentChanged(const QModelIndex &current, const QModel
if (current.isValid())
{
torrent = m_listModel->torrentHandle(mapToSource(current));
// Scroll Fix
scrollTo(current);
// Fix scrolling to the lowermost visible torrent
QMetaObject::invokeMethod(this, [this, current] { scrollTo(current); }, Qt::QueuedConnection);
}
emit currentTorrentChanged(torrent);
}