From: Enrico Forestieri Date: Thu, 26 May 2011 19:10:12 +0000 (+0000) Subject: When compiling with MSVC on Windows, we can't rely on the returned timestamp X-Git-Tag: 2.0.1~286 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0fcd94beec1be9048c80ca729f880f1f6473165a;p=features.git 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 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 683982a2f7..89a00c6609 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3522,14 +3522,16 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) addExtension(mastername, "dvi"))); FileName const pdfname(addName(path.absFileName(), 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.")); break; } string outname = dviname.onlyFileName(); string command = lyxrc.forward_search_dvi; - if (!dviname.exists() || - pdfname.lastModified() > dviname.lastModified()) { + if (!have_dvi || (have_pdf && + pdfname.lastModified() > dviname.lastModified())) { outname = pdfname.onlyFileName(); command = lyxrc.forward_search_pdf; } diff --git a/status.20x b/status.20x index a0e7d6b3be..9a5d65d9e2 100644 --- a/status.20x +++ b/status.20x @@ -86,6 +86,8 @@ What's new - On Windows, allow to automatically switch TeX engines without the need of manually saving the preferences after reconfiguring (bug 7557). +- Fix dvi forward search on Windows when compiling with MSVC. + * USER INTERFACE