Bug 422080 - Continuous view and multiple tabs
Summary: Continuous view and multiple tabs
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.9.3
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-26 08:03 UTC by Guilherme Dias da Fonseca
Modified: 2021-04-08 18:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Dias da Fonseca 2020-05-26 08:03:27 UTC
When the setting to open new files in tabs is on, the continuous view checkbox behaves erratically.

STEPS TO REPRODUCE
1. Enable open new files in tabs
2. Open two files that show initially in continuous view
3. Disable continuous view in file number 1
4. Disable continuous view in file number 2

OBSERVED RESULT
File number 2 will remain in continuous view. Re-enabling continuous view in file 2 and disabling it one more time solves the problem.

EXPECTED RESULT
File number 2 should not show in continuous view.
Comment 1 Yuri Chornoivan 2020-05-26 08:07:46 UTC
Confirmed for git/master.
Comment 2 David Hurka 2020-06-08 19:27:02 UTC
I assume the behavior does not match Bug 421399?
Comment 3 Guilherme Dias da Fonseca 2020-06-09 12:53:20 UTC
I do not think it is the same problem as Bug 421399. The bug here is linked to tabbed view mode, while 421399 is not. I have not been able to reproduce 421399, and they say it does not always happen. The bug reported here happens exactly the same way every time I try. Since the bug here is deterministic and does not involve okular freezing, it may be easier to look at and may shed some light on what could be causing bug 421399.
Comment 4 Albert Astals Cid 2021-01-17 11:03:24 UTC
Before fixing this we need to agree whether "Continous view" is an Okular setting or a view/document setting.

That is, if you change continuous mode, should it be changed in all the open document/views or just in the current document/view?

The code right now is half a mess in which some parts of the code think that setting is Okular wide and some parts think it's document/view specific.

I'm really not decided on which one is better.

Opinions?
Comment 5 Guilherme Dias da Fonseca 2021-01-19 14:09:29 UTC
I believe it should be a "document" setting because slides are more easily read in single page mode, while I believe continuous view is preferred in most other cases. Opening up a slide show pdf and the corresponding full text article is a somewhat common usage case to justify this choice.
Comment 6 Albert Astals Cid 2021-03-04 22:19:10 UTC
Asked in https://tsdgeos.blogspot.com/2021/02/okular-should-continuous-view-be-okular.html and had a 2/2 for each answer ^_^

But discussed with some other devels it seems we agreed that per document with a default makes sense, so i'll try to get that done at some point
Comment 7 Albert Astals Cid 2021-04-08 00:57:41 UTC
Git commit aa0d1b459b2f85515768639aa9e6620eb1e121de by Albert Astals Cid, on behalf of Mahmoud Khalil.
Committed on 07/04/2021 at 21:39.
Pushed by aacid into branch 'master'.

Fixes changing continuous mode while on tabs issue

Toggling the Continuous mode while opening multiple tabs caused an issue
in Okular, in which it considered it a global setting. So, toggling it
for one document, then toggling it again for the other documents may not
take effect. This should fix it by considering this setting a per
document setting, and therefore toggling the mode for one document
shouldn't have any effect for other documents.

M  +2    -0    conf/okular.kcfg
M  +5    -0    part/dlggeneral.cpp
M  +24   -20   part/pageview.cpp
M  +8    -1    part/pageview.h

https://invent.kde.org/graphics/okular/commit/aa0d1b459b2f85515768639aa9e6620eb1e121de