From ca8559549c2b77b5adb958557c3a6c9d6ebc5d47 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 4 Jul 2019 14:13:27 -0700 Subject: [PATCH] Qt: Fix GL display not updating while paused --- src/platform/qt/DisplayGL.cpp | 3 --- src/platform/qt/DisplayGL.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 94069c96d..06ff72f11 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -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(); } } diff --git a/src/platform/qt/DisplayGL.h b/src/platform/qt/DisplayGL.h index 40cc05b77..88f18a58a 100644 --- a/src/platform/qt/DisplayGL.h +++ b/src/platform/qt/DisplayGL.h @@ -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: