]> git.lyx.org Git - features.git/commitdiff
Clear the error list before second LaTeX run
authorScott Kostyshak <skostysh@lyx.org>
Thu, 19 Nov 2015 05:19:00 +0000 (00:19 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 20 Nov 2015 18:47:11 +0000 (13:47 -0500)
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.

src/LaTeX.cpp
src/LaTeX.h

index 0949c69b7dfcf73d667f87e2771923136aaef86c..37c8703b0d125a0c597c143dc1859794d56301cf 100644 (file)
@@ -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);
        }
index 08c9dfd372643d9025e249994eb5ff69c3a2c94b..4d27e68a1d30ca687b5504343ad7b3907f141b77 100644 (file)
@@ -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;