Commit 2c21aac6 authored by John Harwell's avatar John Harwell
Browse files

This change only affects the usage of QOpenGLWidget which is used with Qt...

This change only affects the usage of QOpenGLWidget which is used with Qt 5.12.0 on John's Mac.  All build systems use QGLWidget with Qt 5.7.x.   Anyway, there is a bug in QOpenGLWidget::repaint() as it does not function as described in the Qt documentation.  It is supposed to repaint the graphics (call paintGL()), before returning.  However, it does not and functions like QOpenGLWidget::update() and returns with the graphics being updated later by Qt.  There are two Qt bug reports for this (QT-BUG-74404 and QTBUG-53107).  A previous work-around made a call to QApplication::processEvents() after the call to repaint() and it appeared to fix the problem.  However, annotation dragging was found to be unusable (annotations kept moving after release of the mouse and did not follow the mouse) due to processEvents() allowing mouse event while still updating graphics.  Now, the call to processEvents() has been replaced with a call to grabFrameBuffer().  This captures an image and I assume it waits until the graphics have updated before capturing the image.  This fixes the problem with annotation dragging.
parent 0d21ff9a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment