Bug 167220 - Okular does not remember the zoom
Summary: Okular does not remember the zoom
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.6.90
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 175624 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-22 16:26 UTC by Arend van Beelen jr.
Modified: 2008-12-08 19:42 UTC (History)
2 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 Arend van Beelen jr. 2008-07-22 16:26:48 UTC
Version:           0.6.90 (using 4.00.98 (KDE 4.0.98 (4.1 RC1)), Kubuntu packages)
Compiler:          gcc
OS:                Linux (i686) release 2.6.24-19-server

When I open a document with Okular, it starts with the Zoom mode "Fit Page". However, because the font on most pages is rather small when viewed this way, I generally prefer to use "Fit Width".

Please make it so that Okular remembers and applies the last-used Zoom mode when I open a new document.
Comment 1 Pino Toscano 2008-07-22 20:13:49 UTC
It's a bug, actually.
Comment 2 Pino Toscano 2008-07-22 20:15:12 UTC
SVN commit 836658 by pino:

& is different than |
fix a condition that made the view loading and saving vanish into the hyperspace

BUG: 167220


 M  +4 -4      document.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=836658
Comment 3 Pino Toscano 2008-07-22 20:17:29 UTC
SVN commit 836661 by pino:

backport: fix the condition for loading and saving the view(s)

CCBUG: 167220


 M  +4 -4      document.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=836661
Comment 4 Arend van Beelen jr. 2008-08-01 12:14:58 UTC
Am I right in assuming that the backport went into KDE 4.1.0 final? I just upgraded yesterday, and now Okular seems to correctly remember the view. Most of the time.

Unfortunately, it still sometimes reverts back to Fit Page.

My workflow is as follows: I'm working a lot in Kile to work on my thesis. Regularly I run latex and pdflatex to (re)generate the PDF of my work. I then fire up Okular to see the result (all through shortcuts within Kile, where I set the command to "/usr/lib/kde4/bin/okular '%target'").

When Okular opens, it opens in Fit Width most of time, but Fit Page sometimes. It appears that Okular only forgets its view when I have made updates and regenerated the PDF, and never forgets when the PDF is unmodified. Still, it doesn't forget /always/ when the PDF is modified, so I'm not sure what causes this.

Hopefully you can find and fix this case that causes it to forget its view as well. Thanks for your time, and the first fix which already improves the situation! ;)

PS.: On a sidenote, it would be nice if Okular could remember its window state (maximized or not, ...) as well.
Comment 5 Pino Toscano 2008-08-01 12:25:02 UTC
Does the kile workflow generate a pdf with a different filename?
Comment 6 Arend van Beelen jr. 2008-08-01 13:18:38 UTC
No, it's always the same filename.
Comment 7 solsTiCe 2008-08-03 17:22:51 UTC
i am using kde 4.1 and i still see this bug. zoom state is never remembered. 

and the default would be fit width than fit page. that's annoying to always change that default when you open okular
Comment 8 solsTiCe 2008-08-03 17:34:57 UTC
oops in fact it works. the zoom level is remembered /o\
Comment 9 Nick B 2008-08-18 20:07:16 UTC
I have the same behavior as Arend van Beelen jr. in KDE 4.1.0.  'Fit width' is only remembered for the same file (which are always unmodified in my case).  I've been told this is intentional, but in that case I'd request that the default be changed to 'fit width', as 'fit page' is generally difficult to use for doing anything other than viewing the layout of a page.
Comment 10 Pino Toscano 2008-08-19 12:41:03 UTC
> I have the same behavior as Arend van Beelen jr. in KDE 4.1.0.

That is?

> 'Fit width' is only remembered for the same file

This is correct.

> I've been told this is intentional, but in that case I'd request that the
> default be changed to 'fit width', as 'fit page' is generally difficult to use
> for doing anything other than viewing the layout of a page.

Please don't hijack this bug. If you really want, open a new wish asking for that.
Comment 11 Pino Toscano 2008-08-22 14:52:15 UTC
(In reply to comment #4)
> When Okular opens, it opens in Fit Width most of time, but Fit Page sometimes.

It would be nice to know what "sometimes" corresponds to, especially that I have been unable to reproduce it (even once).

Can you please check whether there are stale okular processes running after regenerating/updating?
Comment 12 Nick B 2008-09-25 10:10:08 UTC
Sorry, it wasn't my intention to hijack this bug.  The problems I was experiencing (okular forgetting zoom for the same file repeatedly) stopped with KDE 4.1.1.  In my request I was getting a little side-tracked, but would like to repeat (politely!) the end of the original description of this report: "Please make it so that Okular remembers and applies the last-used Zoom mode
when I open a new document."

If that's no longer germane, I'll open a new bug.
Comment 13 Pino Toscano 2008-09-25 10:37:34 UTC
(In reply to comment #12)
> In my request I was getting a little side-tracked, but would like
> to repeat (politely!) the end of the original description of this report:
> "Please make it so that Okular remembers and applies the last-used Zoom mode
> when I open a new document."

That's what we changed in KDE 4.1, and it won't be changed back, sorry.
Zoom is per-document, and the default zoom for new documents is "fit to width" (KDE 4.1.2 and more).
Comment 14 Pino Toscano 2008-11-19 23:32:45 UTC
*** Bug 175624 has been marked as a duplicate of this bug. ***
Comment 15 Pino Toscano 2008-11-30 14:55:01 UTC
@Arend van Beelen jr.:
doesn't regenerating the PDF with pdflatex always generate a different PDF?
If so, then Okular always gets a different document, that of course has no metadata (zoom included) saved available.
Comment 16 Albert Astals Cid 2008-11-30 15:16:30 UTC
Shouldn't be that difficult to detect we are reloading the file because it was dirtied and reapply the view last settings we had.
Comment 17 Albert Astals Cid 2008-12-08 19:42:03 UTC
Closing the bug, with the code that will be KDE 4.2 i've not had any problem of okular not rembering the zoom level.

Please reopen once KDE 4.2 is released and you still have the problem.