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 <fatzer2@gmail.com>
pull/22/head
Alexander Golubev 4 months ago
parent 32098c8e56
commit 6ca60fdaa3

@ -243,9 +243,9 @@ void MainWindow::openURL(const KURL& url) {
mFileViewController->setDirURL(url); mFileViewController->setDirURL(url);
mFileViewController->setFocus(); mFileViewController->setFocus();
} else { } else {
mDocument->setURL(url);
mFileViewController->setDirURL(url.upURL()); mFileViewController->setDirURL(url.upURL());
mFileViewController->setFileNameToSelect(url.filename()); mFileViewController->setFileNameToSelect(url.filename());
mDocument->setURL(url);
mImageViewController->setFocus(); mImageViewController->setFocus();
} }

Loading…
Cancel
Save