mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 18:24:48 +00:00
* Buffer.cpp:
- make LaTeX logfile dialog work for child documents and master-buffer-[view|update]: if there's only a master file log or if the master file log is newer, it is displayed. * Buffer.h: typo. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30206 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
99e9a1779d
commit
9388e76dc0
@ -467,14 +467,31 @@ string Buffer::logName(LogType * type) const
|
|||||||
changeExtension(filename,
|
changeExtension(filename,
|
||||||
formats.extension(bufferFormat()) + ".out"))));
|
formats.extension(bufferFormat()) + ".out"))));
|
||||||
|
|
||||||
// If no Latex log or Build log is newer, show Build log
|
// Also consider the master buffer log file
|
||||||
|
FileName masterfname = fname;
|
||||||
|
LogType mtype;
|
||||||
|
if (masterBuffer() != this) {
|
||||||
|
string const mlogfile = masterBuffer()->logName(&mtype);
|
||||||
|
masterfname = FileName(mlogfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no Latex log or Build log is newer, show Build log
|
||||||
if (bname.exists() &&
|
if (bname.exists() &&
|
||||||
(!fname.exists() || fname.lastModified() < bname.lastModified())) {
|
((!fname.exists() && !masterfname.exists())
|
||||||
|
|| (fname.lastModified() < bname.lastModified()
|
||||||
|
&& masterfname.lastModified() < bname.lastModified()))) {
|
||||||
LYXERR(Debug::FILES, "Log name calculated as: " << bname);
|
LYXERR(Debug::FILES, "Log name calculated as: " << bname);
|
||||||
if (type)
|
if (type)
|
||||||
*type = buildlog;
|
*type = buildlog;
|
||||||
return bname.absFilename();
|
return bname.absFilename();
|
||||||
|
// If we have a newer master file log or only a master log, show this
|
||||||
|
} else if (fname != masterfname
|
||||||
|
&& (!fname.exists() && masterfname.exists()
|
||||||
|
|| fname.lastModified() < masterfname.lastModified())) {
|
||||||
|
LYXERR(Debug::FILES, "Log name calculated as: " << masterfname);
|
||||||
|
if (type)
|
||||||
|
*type = mtype;
|
||||||
|
return masterfname.absFilename();
|
||||||
}
|
}
|
||||||
LYXERR(Debug::FILES, "Log name calculated as: " << fname);
|
LYXERR(Debug::FILES, "Log name calculated as: " << fname);
|
||||||
if (type)
|
if (type)
|
||||||
|
@ -283,7 +283,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::string latexName(bool no_path = true) const;
|
std::string latexName(bool no_path = true) const;
|
||||||
|
|
||||||
/// Get thee name and type of the log.
|
/// Get the name and type of the log.
|
||||||
std::string logName(LogType * type = 0) const;
|
std::string logName(LogType * type = 0) const;
|
||||||
|
|
||||||
/// Change name of buffer. Updates "read-only" flag.
|
/// Change name of buffer. Updates "read-only" flag.
|
||||||
|
Loading…
Reference in New Issue
Block a user