commit 1bd56c8730a55bc78944e3803f4953cd4e733d8a
Author: Scott Kostyshak <[email protected]>
Date: Thu Nov 19 00:19:00 2015 -0500
Clear the error list before second LaTeX run
It was possible for errors that occured in the first run to be shown
in the error list after the second run. Now, the errors are cleared
before the second run.
Although I do not have a reproducible example at hand, I imagine
this situation would occur if a rerun is required and there is still
an error after the rerun.
Related to #9765.
diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index 0949c69..37c8703 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -237,6 +237,7 @@ int LaTeX::run(TeXErrors & terr)
scanres = scanLogFile(terr);
if (scanres & ERROR_RERUN) {
LYXERR(Debug::LATEX, "Rerunning LaTeX");
+ terr.clearErrors();
exit_code = startscript();
scanres = scanLogFile(terr);
}
diff --git a/src/LaTeX.h b/src/LaTeX.h
index 08c9dfd..4d27e68 100644
--- a/src/LaTeX.h
+++ b/src/LaTeX.h
@@ -64,6 +64,8 @@ public:
void insertError(int line, docstring const & error_desc,
docstring const & error_text,
std::string const & child_name = empty_string());
+ ///
+ void clearErrors() { errors.clear(); }
private:
///
Errors errors;