Qt: Fix GL display not updating while paused

This commit is contained in:
Vicki Pfau 2019-07-04 14:13:27 -07:00
parent c0120cd586
commit ca8559549c
2 changed files with 1 additions and 4 deletions

View File

@ -64,7 +64,6 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent)
}
m_painter = new PainterGL(windowHandle(), m_gl, forceVersion);
setUpdatesEnabled(false); // Prevent paint events, which can cause race conditions
}
DisplayGL::~DisplayGL() {
@ -475,8 +474,6 @@ void PainterGL::swap() {
}
if (!m_queue.isEmpty()) {
QMetaObject::invokeMethod(this, "draw", Qt::QueuedConnection);
} else {
m_swapTimer.start();
}
}

View File

@ -60,7 +60,7 @@ public slots:
void resizeContext() override;
protected:
virtual void paintEvent(QPaintEvent*) override {}
virtual void paintEvent(QPaintEvent*) override { forceDraw(); }
virtual void resizeEvent(QResizeEvent*) override;
private: