]> git.lyx.org Git - features.git/commit
Do not show master's errors if compiling child
authorScott Kostyshak <skostysh@lyx.org>
Sat, 7 Apr 2018 21:11:33 +0000 (17:11 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sun, 8 Apr 2018 13:51:01 +0000 (09:51 -0400)
commit8d2b121ef506804fe2c894a61cd4232e87254847
treeb9e27122197816cfa529872c424ab73142885d90
parent2ecc3b09c6a9c663bec87356b2ec512f37676c5c
Do not show master's errors if compiling child

If a master document is compiled and has errors, and then a child is
compiled without error, the errors from the master compilation were
shown.

The setup of the relevant code is the following:

  processingThreadFinished() calls errors().  errors() makes the
  assumption that if it is called, there must have been an error
  somewhere.

The logic of the setup is the following:

  processingThreadFinished() knows whether there was an error on
  the most recent preview/export, although it doesn't know whether
  the error is from master or child (i.e. does not know whether the
  user was compiling the child, or whether master-buffer-view was
  called).  Inside error(), if there is no error in the child, it is
  assumed the error is from master.

For the above logic to work, errors() should only be called if there
was an error.

This commit fixes #11106 and preserves the fix to #7330.
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h