#692 Internal Pdf Viewer

None
fixed
nobody
None
1
2015-03-30
2013-02-21
tomacs
No

I use Win7 + TXS SVN3764.

Run TXS
Options | Configure TeXstudio... | Build | PDF Viewer: Internal PDF Viewer (Windowed) | OK
Open a tex file
F1
Maximize PDF Viewer
Ctrl+Q

Run TXS again
Open tex file
F1

BUG: PDF Viewer is not maximized but in texstudio.ini contains the following line:
Geometries\PdfViewerMaximized=true

Discussion

  • tomacs
    tomacs
    2013-02-27

    It seems 3704 generates this bug.

     
  • @tim: do you remember why you changed the code there (rev. 3704)

     
  • Tim Hoffmann
    Tim Hoffmann
    2013-03-10

    Yes. As the SVN entry says it's because of
    http://sourceforge.net/p/texstudio/discussion/907839/thread/5b053f8d/

    3704 was thought as a quick workaround. I assumed that the only reason for changing the window state was to unminimize it (needed when running "view" while the viewer is already open). There's a showMaximized in the constructor. I'd expect that show() should preserve the maximized state, but apparently it does not.

    IMO all these bugs (and also my quick fix) are a symptom that we do not distinguish loading and reloading of a pdf properly. In the latter case, we want to keep the current geometry and state (which may differ from the one in the config) and we may need to unminimize the viewer. In the former case, the geometry and state should be restored from the config. In other words changing the window state (e.g. unminimize()) should not be part of load.

    Moreover, if the viewer is open, we currently close the complete viewer and open it anew on "view". Then we try to recover the previous geometry. This is unnecessary. We should only close and open the doc.

    So, it should go like this
    view:
    if viewer exists
    reload doc (close doc and load doc)
    unminimize if necessary
    else
    create viewer (including restoring the geometry)
    load doc

     
  • seems to work now

     
    • status: open --> fixed
    • Group: -->