Bug 330643 - Trim Margins resets View Mode
Summary: Trim Margins resets View Mode
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.18.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-01 20:00 UTC by Franz Berger
Modified: 2019-06-09 17:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Berger 2014-02-01 20:00:07 UTC
When toggling Trim Margins, Okular applies the View Mode settings as saved in okularpartrc, independently of which mode is set in the current Okular window.

For example, this is problematic when viewing multiple documents with different view modes and toggling Trim Margins on one of them.

Reproducible: Always

Steps to Reproduce:
1. Open two or more documents in Okular.
2. Set one document to Single Page.
3. Set another document to Facing Pages.
4. Toggle Trim Margins on the first document.
Actual Results:  
The view mode of the first document (which was originally in Single Page mode and on which Trim Margins was toggled) is now in Facing Pages mode.
Moreover, the view mode settings still show it being "Single Page", which is obviously not true.

Expected Results:  
The first document should still be in Single Page mode after toggling Trim Margins.
Comment 1 Laura David Hurka 2019-06-09 17:00:44 UTC
Confirmed with Okular 1.7.2.

It’s simple: Every tab is a Part, and when changing the view mode in a Part, it is written to the configuration file. (Only the viewport position is stored per-document.)

Trim margins changes the page geometries, and thus calls slotRelayoutPages(). That will calculate a new layout (i. e. move the pages closer together because they don’t have margins anymore), but has to read the View Mode (the “layout mode”) from the configuration file.

The bug could be expressed: Parts don’t syncronize their View Mode, so changing the View Mode in one Part makes the others unsynchronized to the configuration file.