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
This commit is contained in:
Isak05 2025-04-25 00:45:34 +02:00
commit 358f4c68bb

View file

@ -255,8 +255,11 @@ TransferListModel *TransferListWidget::getSourceModel() const
} }
void TransferListWidget::previewFile(const Path &filePath) void TransferListWidget::previewFile(const Path &filePath)
{
QTimer::singleShot(0, this, [=]()
{ {
Utils::Gui::openPath(filePath); Utils::Gui::openPath(filePath);
});
} }
QModelIndex TransferListWidget::mapToSource(const QModelIndex &index) const QModelIndex TransferListWidget::mapToSource(const QModelIndex &index) const