]> git.lyx.org Git - features.git/commitdiff
Try to fix bug #10989.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 26 Apr 2018 03:46:13 +0000 (23:46 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 26 Apr 2018 03:46:13 +0000 (23:46 -0400)
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

index 4d25b08f68481f6d183ecfad5d3fbf99ddba021b..7c80fcce42faffda7bc9c10d1d714c2fd881c818 100644 (file)
@@ -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());