From 98bdfcef650391672a13dfdb46fc6e2a7e898a50 Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Tue, 1 Mar 2022 06:49:40 +0200 Subject: [PATCH] Fix scrolling to the lowermost visible torrent Fixes #3221. PR #16543. --- src/gui/transferlistwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index 193aab036..d1bf854db 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -1178,8 +1178,8 @@ void TransferListWidget::currentChanged(const QModelIndex ¤t, 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); }