[okular] [Bug 412978] Okular creates tabs for deleted files
Yuri Chornoivan
bugzilla_noreply at kde.org
Tue Oct 15 18:19:56 BST 2019
https://bugs.kde.org/show_bug.cgi?id=412978
Yuri Chornoivan <yurchor at ukr.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yurchor at ukr.net
--- Comment #2 from Yuri Chornoivan <yurchor at ukr.net> ---
(In reply to Andi Sardina from comment #1)
> I was able to reproduce this. You can't close the document with CTRL+W, but
> you can close the tab. I will work on this.
Just one of the possible solutions if you are going to create an MR on gitlab:
diff --git a/shell/shell.cpp b/shell/shell.cpp
index 8c0c62e5b..4f397ef0b 100644
--- a/shell/shell.cpp
+++ b/shell/shell.cpp
@@ -675,7 +675,10 @@ void Shell::openNewTab( const QUrl& url, const QString
&serializedOptions )
if( part->openUrl(url) )
m_recent->addUrl( url );
else
+ {
setActiveTab( previousActiveTab );
+ closeTab( m_tabs.size() - 1 );
+ }
}
void Shell::applyOptionsToPart( QObject* part, const QString
&serializedOptions )
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list