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.
This commit is contained in:
Richard Kimberly Heck 2018-04-25 23:46:13 -04:00
parent 4e8730b57e
commit 19e6977b5b

View File

@ -1247,6 +1247,10 @@ void GuiWorkArea::Private::paintPreeditText(GuiPainter & pain)
void GuiWorkArea::paintEvent(QPaintEvent * ev) void GuiWorkArea::paintEvent(QPaintEvent * ev)
{ {
// Hopefully fixes bug #10989.
if (view().busy())
return;
// LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x() // LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x()
// << " y: " << rc.y() << " w: " << rc.width() << " h: " << rc.height()); // << " y: " << rc.y() << " w: " << rc.width() << " h: " << rc.height());