Bug 377151 - View mode is transferred to other open documents
Summary: View mode is transferred to other open documents
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.0.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 432441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-03 09:55 UTC by Bodo Graumann
Modified: 2022-05-22 10:46 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bodo Graumann 2017-03-03 09:55:31 UTC
I often have multiple documents open in okular. Some are in view mode "Single Page", while others are in "Facing Pages". The problem now is, that the selected view mode is not local to each document. So when I change the view mode in one document and then scroll in another, the other also changes to the new view mode.

For Example:
* Start Okular
* Set view mode to "Single Page"
* Open 1.pdf
* Open 2.pdf (automatically in new window)
* In 1.pdf select "Facing Pages"
* (1.pdf is in "Facing Pages" mode)
* Scroll or Reload 2.pdf

Expected: 2.pdf is in "Single Page" view mode

Actual Result: 2.pdf is in "Facing Pages" mode, but the menu item / toolbar icon selection still shows "Single Page"

Now continue by:
* In 2.pdf select "Single Page" (even though it is already selected)
* (2.pdf returns to the correct view)
* In 1.pdf select "Single Page"

Expected: 1.pdf returns to "Single Page" view mode

Actual Result: 1.pdf stays in "Facing Pages" mode, but gui selection goes to "Single Page"
Comment 1 Albert Astals Cid 2017-03-03 22:35:44 UTC
I can't reproduce this issue in Okular 1.0, can anyone with the same version give it a try?
Comment 2 Bodo Graumann 2017-03-07 09:11:12 UTC
I updated okular to version 1.0.0 and the issue is still there.
Note that it only occurs if the second document is opened from within the first one. (For example from the menu via File > Open...)
If one of the documents is opened from the file browser, the issue does not arise.
Comment 3 Oliver Sander 2017-03-07 09:23:28 UTC
I can confirm this with the current git master, on Debian testing.

It behaves exactly as described, with the small irrelevant nitpick that 

* Set view mode to "Single Page"
* Open 1.pdf

needs to be done in reverse order, because you cannot change the view mode when there is no document yet.
Comment 4 Bodo Graumann 2017-03-07 09:39:19 UTC
Maybe that is another bug:
While it is true, that the menu items for view mode selection are grayed out when there is no document loaded, I have added the buttons for "Single Page" and "Facing Pages" to the toolbar and those are usable all the time.

What I also noticed is that those two buttons don’t show (breeze) icons anymore in the newer version, but maybe that is a Gentoo issue. (the version is not stable yet)

Also I was actually using version 1.0.2 (kde-apps/okular-16.12.2 in gentoo). The version page furthermore says:

Using:
KDE Frameworks 5.29.0
Qt 5.6.2 (built against 5.6.2)
The xcb windowing system
Comment 5 Albert Astals Cid 2017-03-07 22:06:44 UTC
"Note that it only occurs if the second document is opened from within the first one. "

So you mean that the first document has a link to the second? This seems like an important bit you missed from your "steps to reproduce" list.

Can you attach the documents you're using?
Comment 6 Bodo Graumann 2017-03-07 22:21:28 UTC
No, that is not what I meant and I wrote as much. Please read my complete comment. Maybe my wording in that sentence was not clear: I meant "from the okular window in which the first document is open".
It does not matter which document is used. The bug occurs with all of them.

Oliver has reproduced the issue, so maybe it can be considered 'confirmed'?
Comment 7 Albert Astals Cid 2017-03-07 22:49:31 UTC
Who cares if its set to confirmed or not, what i want is a way to reproduce it so i can fix it, do you prefer me to put it as confirmed and forget about it or to try to reproduce it myself so i can fix it?
Comment 8 Albert Astals Cid 2017-03-07 23:06:33 UTC
Ok, yes, don't know why could not reproduce it the other day
Comment 9 Laura David Hurka 2021-02-03 15:23:37 UTC
*** Bug 432441 has been marked as a duplicate of this bug. ***
Comment 10 zkdarian 2021-02-06 05:19:50 UTC
Open two or more documents within one window.  Set view mode to single-page in one tab and facing-pages in another tab.  At first it might seem like it works fine, but the moment you change the zoom or open another tab or close a tab, the jig is up.  Doesn't matter which documents you choose.  I think okular must be treating the view mode as a global variable or something.  FWIW I confirm this bug is real.
Comment 11 Jan Hajer 2022-03-10 12:29:32 UTC
I can confirm that this bug appears regularly when working with multiple pdfs over longer time in okular.
It also affects the trim option.
Ubuntu with okular 21.12.3