commit c19fd610b924caa8dc94a8ec9f95aa03b42c09c8
Author: Scott Kostyshak <skost...@lyx.org>
Date:   Sat Apr 7 17:11:33 2018 -0400

    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.
    
    (cherry picked from commit 8d2b121ef506804fe2c894a61cd4232e87254847)
---
 src/frontends/qt4/GuiView.cpp |    5 ++++-
 src/frontends/qt4/GuiView.h   |    3 +++
 status.23x                    |    2 ++
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index e043bc2..45c26c3 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -725,7 +725,10 @@ void GuiView::processingThreadFinished()
                errors("Export");
                return;
        }
-       errors(d.last_export_format);
+       if (status != Buffer::ExportSuccess && status != Buffer::PreviewSuccess 
&&
+           status != Buffer::ExportCancel) {
+               errors(d.last_export_format);
+       }
 }
 
 
diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h
index ecf4e44..8ff5192 100644
--- a/src/frontends/qt4/GuiView.h
+++ b/src/frontends/qt4/GuiView.h
@@ -166,6 +166,9 @@ public:
        /// \name GuiBufferDelegate.
        //@{
        void resetAutosaveTimers();
+       // shows an error list (possibly master's)
+       // even if from_master is false, might show master's error list.
+       // this function should only be called if there was an error (#11106).
        void errors(std::string const &, bool from_master = false);
        void structureChanged();
        void updateTocItem(std::string const &, DocIterator const &);
diff --git a/status.23x b/status.23x
index feea321..ef9bf91 100644
--- a/status.23x
+++ b/status.23x
@@ -82,6 +82,8 @@ What's new
 - When only Enchant is configured as a spell checker, configure it
   properly as default.
 
+- Do not show errors from master when compiling child (bug 11106).
+
 
 * INTERNALS
 

Reply via email to