As improbable as it may be, an error could occur in both master and child

at the same line. Given that we know where the error occurred, don't
unnecessarily check the master first.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37846 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-03-04 13:52:01 +00:00
parent 2e18f6a671
commit 655a99f8c2

View File

@ -3899,9 +3899,10 @@ void Buffer::bufferErrors(TeXErrors const & terr, ErrorList & errorList) const
int errorRow = it->error_in_line;
Buffer const * buf = 0;
Impl const * p = d;
p->texrow.getIdFromRow(errorRow, id_start, pos_start);
if (id_start == -1) {
// Check whether the error occurred in a child
if (it->child_name.empty())
p->texrow.getIdFromRow(errorRow, id_start, pos_start);
else {
// The error occurred in a child
ListOfBuffers::const_iterator cit = clist.begin();
for (; cit != cen; ++cit) {
string const child_name =