Bug 419356 - Default pageview (e.g. fit page, fit width) does not register sometimes
Summary: Default pageview (e.g. fit page, fit width) does not register sometimes
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.9.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-29 06:27 UTC by norwegian_pancakes
Modified: 2020-04-07 04:58 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 norwegian_pancakes 2020-03-29 06:27:42 UTC
SUMMARY
There is an option to set the default view (e.g. fit page, fit width, etc...).

STEPS TO REPRODUCE
0. Open a PDF document in Okular
1. Go to Settings --> Configure Okular --> General --> Default Zoom
2. Choose an option (I chose fit page because I use a vertical monitor)
3. Apply changes or click OK
4. Open a new PDF document in Okular

OBSERVED RESULT
The document opens up with Fit Width as the default, which is the same as when using Okular for the first time. Strangely, I went back to the settings window using the steps above to check the default and it says Fit Page, as I set it. In the same settings window
I clicked "Default" to reset the settings (consequently, the default zoom becomes Fit Width), then changed the default zoom to Fit Page. Afterwards the new default zoom worked in subsequent documents.

EXPECTED RESULT
After changing the default zoom, opening subsequent documents should adhere to said zoom.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Tumbleweed
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2020-03-29 13:23:37 UTC
Are you sure you haven't opened those documents before and you are just getting the feature that rembembers where you where, how, etc for documents you opened in the past?
Comment 2 norwegian_pancakes 2020-03-30 05:23:09 UTC
I just opened a new document to try it out, and the default that I set, Fit Page, now applies to said document.
Comment 3 Albert Astals Cid 2020-03-30 17:18:49 UTC
So that is good?
Comment 4 Laura David Hurka 2020-03-30 21:39:06 UTC
You should be aware, that when you use the configuration dialog, there is already one Part¹ loaded. And that Part loaded the old configuration.

I. e. when you open a new document after closing the configuration dialog, you still operate on the old Part, and so on the old configuration. Only when you start a new Part by opening a second document, it loads the new configuration.

You can observe that by looking at the zoom combobox in the toolbar. It is already initalized before you open the configuration dialog.

1) Part: One “Instance of document reader”
Comment 5 Laura David Hurka 2020-03-30 21:40:43 UTC
Possible solutions would be WONTFIX, or to load the default zoom in Part::configChanged when no document is loaded.
Comment 6 norwegian_pancakes 2020-03-31 20:36:38 UTC
(In reply to Albert Astals Cid from comment #3)
> So that is good?

It's good when I take an unorthodox series of steps to set the default zoom. The bug lies somewhere in the "normal" way to set a default zoom. In the unorthodox steps, I explicitly click the "Defaults" button to the left of the "OK" button. Then it works. Normally, I shouldn't have to click "Defaults".
Comment 7 Albert Astals Cid 2020-03-31 21:57:28 UTC
I really don't understand the problem, but seems David does so i'm going to remove this from needs info