mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
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:
parent
18e968a431
commit
1d5204315e
@ -3737,13 +3737,11 @@ Buffer::ExportStatus Buffer::doExport(string const & target, 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 ExportError;
|
||||
}
|
||||
} else if (!lyxrc.tex_allows_spaces
|
||||
&& contains(filePath(), ' ')) {
|
||||
Alert::error(_("File name error"),
|
||||
@ -3751,14 +3749,12 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
|
||||
return ExportTexPathHasSpaces;
|
||||
} 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 ExportError;
|
||||
}
|
||||
}
|
||||
|
||||
string const error_type = (format == "program")
|
||||
? "Build" : params().bufferFormat();
|
||||
|
Loading…
Reference in New Issue
Block a user