mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 14:04:25 +00:00
When compiling with MSVC on Windows, we can't rely on the returned timestamp
being -1 if a pdf file doesn't exist. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38848 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8de9932b7c
commit
0fcd94beec
@ -3522,14 +3522,16 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
addExtension(mastername, "dvi")));
|
addExtension(mastername, "dvi")));
|
||||||
FileName const pdfname(addName(path.absFileName(),
|
FileName const pdfname(addName(path.absFileName(),
|
||||||
addExtension(mastername, "pdf")));
|
addExtension(mastername, "pdf")));
|
||||||
if (!dviname.exists() && !pdfname.exists()) {
|
bool const have_dvi = dviname.exists();
|
||||||
|
bool const have_pdf = pdfname.exists();
|
||||||
|
if (!have_dvi && !have_pdf) {
|
||||||
dr.setMessage(_("Please, preview the document first."));
|
dr.setMessage(_("Please, preview the document first."));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string outname = dviname.onlyFileName();
|
string outname = dviname.onlyFileName();
|
||||||
string command = lyxrc.forward_search_dvi;
|
string command = lyxrc.forward_search_dvi;
|
||||||
if (!dviname.exists() ||
|
if (!have_dvi || (have_pdf &&
|
||||||
pdfname.lastModified() > dviname.lastModified()) {
|
pdfname.lastModified() > dviname.lastModified())) {
|
||||||
outname = pdfname.onlyFileName();
|
outname = pdfname.onlyFileName();
|
||||||
command = lyxrc.forward_search_pdf;
|
command = lyxrc.forward_search_pdf;
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,8 @@ What's new
|
|||||||
- On Windows, allow to automatically switch TeX engines without the need
|
- On Windows, allow to automatically switch TeX engines without the need
|
||||||
of manually saving the preferences after reconfiguring (bug 7557).
|
of manually saving the preferences after reconfiguring (bug 7557).
|
||||||
|
|
||||||
|
- Fix dvi forward search on Windows when compiling with MSVC.
|
||||||
|
|
||||||
|
|
||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user