1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

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 <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2022-03-10 22:17:07 +01:00 committed by Juraj Oravec
parent d0ee2f0f37
commit 5a5f983644

View File

@ -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());