Workaround updating frame (and thus darkening the image)

by only updating when there is new data.
This essentially limits the frame rate to the buffer update rate

This will be fixed when painting is done in smaller chunks of the buffer
This commit is contained in:
Gitea
2019-09-17 19:48:44 +02:00
parent 86b99ab8d2
commit e6249131ff

View File

@@ -62,6 +62,9 @@ void OsciWidget::paintEvent(QPaintEvent *event)
void OsciWidget::updateFrameBuffer()
{
// Workaround for flickering (do not update, when there is no new data)
if(m_buffer.empty()) return;
if (m_pixmap.size() != size())
m_pixmap = QPixmap(size());