commit 19e6977b5b527ec8311da35d8f0a40d6fd509080
Author: Richard Kimberly Heck <[email protected]>
Date:   Wed Apr 25 23:46:13 2018 -0400

    Try to fix bug #10989.
    
    The problem is that popping dialogs during reload can cause paint
    events for which we are not ready. If this does not work, then we
    can introduce a new flag, besides 'busy', for that case. But busy
    does not seem to be used very widely, so hopefully this works.
---
 src/frontends/qt4/GuiWorkArea.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp 
b/src/frontends/qt4/GuiWorkArea.cpp
index 4d25b08..7c80fcc 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -1247,6 +1247,10 @@ void GuiWorkArea::Private::paintPreeditText(GuiPainter & 
pain)
 
 void GuiWorkArea::paintEvent(QPaintEvent * ev)
 {
+       // Hopefully fixes bug #10989.
+       if (view().busy())
+               return;
+
        // LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x()
        //      << " y: " << rc.y() << " w: " << rc.width() << " h: " << 
rc.height());
 

Reply via email to