Bug 1217464

Summary: Okular opens a new file several times when called from Libre Office export.
Product: [openSUSE] openSUSE Distribution Reporter: Carlos Robinson <carlos.e.r>
Component: KDE ApplicationsAssignee: E-Mail List <opensuse-kde-bugs>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fvogt
Version: Leap 15.5   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Carlos Robinson 2023-11-23 20:48:21 UTC
This happens both in Plasma/X11 and XFCE desktops.
Okular is the default application to open PDF files.

Have a file in Writer, and select "export to PDF directly", for instance. Make sure "View PDF after export" is ticked. When the file is written, Okular opens automatically with that PDF file in it.

Now do some edit on Write (or not), and click to export the same file again. LO will warn about overwriting the file. Okular then opens a new window with the "second" file. If you repeat the procedure, you get three okular window, all actually with the same modified file.

If Evince is the default PDF app, it opens a single window and reloads the file, which is the correct and expected behavior.
Comment 1 Fabian Vogt 2023-11-24 09:18:47 UTC
You have to enable the "Open documents in tabs" option to make okular reuse existing windows.

You could file a request upstream to change the default and/or add autodetection if the same file is already open.