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>
remotes/origin/release/22.08
Juraj Oravec 4 years ago committed by Juraj Oravec
parent d0ee2f0f37
commit 5a5f983644
  1. 2
      src/lib/other/siteinfo.cpp

@ -277,7 +277,7 @@ void SiteInfo::showPixmap(QPixmap pixmap)
void SiteInfo::showImagePreview(QTreeWidgetItem *item) void SiteInfo::showImagePreview(QTreeWidgetItem *item)
{ {
if (!item) { if ((!item) || (item->treeWidget()->selectedItems().length() > 1)) {
return; return;
} }
QUrl imageUrl = QUrl::fromEncoded(item->text(1).toUtf8()); QUrl imageUrl = QUrl::fromEncoded(item->text(1).toUtf8());

Loading…
Cancel
Save