]> git.lyx.org Git - features.git/commitdiff
Clear the error list from previous errors
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 17 Mar 2012 18:00:25 +0000 (19:00 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 19 Mar 2012 18:29:36 +0000 (19:29 +0100)
We only copied the error list to the cloned buffer when makeLatexfile
failed. This means that a second try will never clear the error list and
the user will be presented the same list again.

Therefore, we unconditionally copy the error list such that we also clear
the list on success.

src/Buffer.cpp
status.20x

index 94d8a951e940f8ffb192ac8c5c26221a26296d3a..d7f8e0869e6a54e74daf57f5cbc1578a9a806b25 100644 (file)
@@ -3600,13 +3600,11 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
        // LaTeX backend
        else if (backend_format == format) {
                runparams.nice = true;
-               if (!makeLaTeXFile(FileName(filename), string(), runparams)) {
-                       if (d->cloned_buffer_) {
-                               d->cloned_buffer_->d->errorLists["Export"] =
-                                       d->errorLists["Export"];
-                       }
+               bool const success = makeLaTeXFile(FileName(filename), string(), runparams);
+               if (d->cloned_buffer_)
+                       d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"];
+               if (!success)
                        return false;
-               }
        } else if (!lyxrc.tex_allows_spaces
                   && contains(filePath(), ' ')) {
                Alert::error(_("File name error"),
@@ -3614,13 +3612,11 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
                return false;
        } else {
                runparams.nice = false;
-               if (!makeLaTeXFile(FileName(filename), filePath(), runparams)) {
-                       if (d->cloned_buffer_) {
-                               d->cloned_buffer_->d->errorLists["Export"] =
-                                       d->errorLists["Export"];
-                       }
+               bool const success = makeLaTeXFile(FileName(filename), string(), runparams);
+               if (d->cloned_buffer_)
+                       d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"];
+               if (!success)
                        return false;
-               }
        }
 
        string const error_type = (format == "program")
index bbda955b515f2a024e80d6a56199d8e386460230..72a00437f656ecc06cb3b0a4358b837f82ea4a96 100644 (file)
@@ -99,6 +99,8 @@ What's new
 
 - Fix undo warning when inserting plain text file (bug 7916).
 
+- Do not repeatedly show export errors of a previous export.
+
 
 * DOCUMENTATION AND LOCALIZATION