mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +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
|
// LaTeX backend
|
||||||
else if (backend_format == format) {
|
else if (backend_format == format) {
|
||||||
runparams.nice = true;
|
runparams.nice = true;
|
||||||
if (!makeLaTeXFile(FileName(filename), string(), runparams)) {
|
bool const success = makeLaTeXFile(FileName(filename), string(), runparams);
|
||||||
if (d->cloned_buffer_) {
|
if (d->cloned_buffer_)
|
||||||
d->cloned_buffer_->d->errorLists["Export"] =
|
d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"];
|
||||||
d->errorLists["Export"];
|
if (!success)
|
||||||
}
|
|
||||||
return ExportError;
|
return ExportError;
|
||||||
}
|
|
||||||
} else if (!lyxrc.tex_allows_spaces
|
} else if (!lyxrc.tex_allows_spaces
|
||||||
&& contains(filePath(), ' ')) {
|
&& contains(filePath(), ' ')) {
|
||||||
Alert::error(_("File name error"),
|
Alert::error(_("File name error"),
|
||||||
@ -3751,14 +3749,12 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
|
|||||||
return ExportTexPathHasSpaces;
|
return ExportTexPathHasSpaces;
|
||||||
} else {
|
} else {
|
||||||
runparams.nice = false;
|
runparams.nice = false;
|
||||||
if (!makeLaTeXFile(FileName(filename), filePath(), runparams)) {
|
bool const success = makeLaTeXFile(FileName(filename), string(), runparams);
|
||||||
if (d->cloned_buffer_) {
|
if (d->cloned_buffer_)
|
||||||
d->cloned_buffer_->d->errorLists["Export"] =
|
d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"];
|
||||||
d->errorLists["Export"];
|
if (!success)
|
||||||
}
|
|
||||||
return ExportError;
|
return ExportError;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
string const error_type = (format == "program")
|
string const error_type = (format == "program")
|
||||||
? "Build" : params().bufferFormat();
|
? "Build" : params().bufferFormat();
|
||||||
|
Loading…
Reference in New Issue
Block a user