From 358f4c68bb4ac079599b137ec1f7e47f0c820b25 Mon Sep 17 00:00:00 2001 From: Isak05 Date: Fri, 25 Apr 2025 00:45:34 +0200 Subject: [PATCH] Fix preview not opening on wayland Deferring the opening of the preview slightly gives the preview select dialog time to close and for focus to shift back to the main window. Closes #22607 --- src/gui/transferlistwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index 95814c0e6..17358729b 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -256,7 +256,10 @@ TransferListModel *TransferListWidget::getSourceModel() const void TransferListWidget::previewFile(const Path &filePath) { - Utils::Gui::openPath(filePath); + QTimer::singleShot(0, this, [=]() + { + Utils::Gui::openPath(filePath); + }); } QModelIndex TransferListWidget::mapToSource(const QModelIndex &index) const