From 6ca60fdaa34563e0eb1087df86ba4b8c8a85b1ad Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Wed, 14 Feb 2024 23:33:53 +0300 Subject: [PATCH] avoid waiting for dir cache when opening a file At least this will eliminate the most annoying part of the bug there the file won't be displayed till the dir cache is completely loaded. Bug: https://mirror.git.trinitydesktop.org/gitea/TDE/gwenview/issues/17 Signed-off-by: Alexander Golubev --- src/app/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 78cd0ed..7b5e292 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -243,9 +243,9 @@ void MainWindow::openURL(const KURL& url) { mFileViewController->setDirURL(url); mFileViewController->setFocus(); } else { - mDocument->setURL(url); mFileViewController->setDirURL(url.upURL()); mFileViewController->setFileNameToSelect(url.filename()); + mDocument->setURL(url); mImageViewController->setFocus(); }