From 5a5f9836440783b505cf1dbfab9c41f50f63cddb Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Thu, 10 Mar 2022 22:17:07 +0100 Subject: [PATCH] SiteInfo: Don't load previews at multiselect BUG: 451284 It looks like the signal currentItemChanged is fired before the selectedItems is updated which makes this protection after the second change of current selection. This is at minimum good enough when selecting items via arrow keys. Signed-off-by: Juraj Oravec --- src/lib/other/siteinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/other/siteinfo.cpp b/src/lib/other/siteinfo.cpp index 08a5fa1d3..9b6fa0930 100644 --- a/src/lib/other/siteinfo.cpp +++ b/src/lib/other/siteinfo.cpp @@ -277,7 +277,7 @@ void SiteInfo::showPixmap(QPixmap pixmap) void SiteInfo::showImagePreview(QTreeWidgetItem *item) { - if (!item) { + if ((!item) || (item->treeWidget()->selectedItems().length() > 1)) { return; } QUrl imageUrl = QUrl::fromEncoded(item->text(1).toUtf8());