TeXworks / texworks

Main codebase for TeXworks, a simple interface for working with TeX documents
https://tug.org/texworks/
GNU General Public License v2.0
686 stars 127 forks source link

Can't close tex without closing pdf #200

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a pdf (i.e. use Tw as pdf viewer, not as tex editor)
2. Open the corresponding tex file (either manually, or by Ctrl+Click)
3. Close the corresponding tex file

What is the expected output? What do you see instead?
Since the pdf was opened first, I'd expect it to remain opened even though
the tex file is closed. However, it is closed (and possible Tw quits if
these were the only windows).

Please use labels and text to provide additional information.
The connection between tex and pdf shouldn't be one-way, IMO. Whatever file
was opened first should probably be "in charge". On the other hand, I guess
there can be found reasons both in favor and against automatic closing of
documents in either cases. Maybe ask the user if a corresponding document
should be closed?

This is related to issue 36.

r426 on Ubuntu 9.04

Original issue reported on code.google.com by st.loeffler on 26 Sep 2009 at 1:10

GoogleCodeExporter commented 9 years ago
I don't want to bother the user with a prompt normally; I think the usual 
pattern of usage would be to open a 
source document, thus getting the preview opened automatically, and closing the 
source document should 
automatically close the associated preview.

It gets a bit trickier with "out-of-order" workflows such as opening the PDF 
manually first; maybe windows 
need to keep track of whether they were opened automatically or by the user, 
and if they were automatic, then 
which other window was the source of the action. But I'm not going to delve 
into this for the current release; 
and I'd consider other restructuring such as the option of using tabbed windows 
to be more important.

Original comment by jfkth...@gmail.com on 28 Sep 2009 at 12:16

GoogleCodeExporter commented 9 years ago
As a side issue, it is useful that when a pdf preview is open by itself, using 
the sync function (crtl Click) correctly opens the source document - worth 
protecting please - if changes are made based on this issue.

Original comment by paul.a.norman on 15 Oct 2010 at 10:12