From: Vincent van Ravesteijn Date: Sat, 17 Mar 2012 18:00:25 +0000 (+0100) Subject: Clear the error list from previous errors X-Git-Tag: 2.0.4~169 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b754fb0253671ca564e6940088c38786083e477c;p=features.git Clear the error list from previous errors 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. --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 94d8a951e9..d7f8e0869e 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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") diff --git a/status.20x b/status.20x index bbda955b51..72a00437f6 100644 --- a/status.20x +++ b/status.20x @@ -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