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.
This commit is contained in:
Vincent van Ravesteijn 2012-03-17 19:00:25 +01:00
parent 9a37ec5152
commit b754fb0253
2 changed files with 10 additions and 12 deletions

View 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")

View 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