From 23e510022788656f88d8420aae6e881e528c1601 Mon Sep 17 00:00:00 2001 From: fourtf Date: Fri, 5 Jan 2018 00:15:03 +0100 Subject: [PATCH] refresh rate lock for ChannelView --- src/widgets/helper/channelview.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index fdf8c3131..ae6fa3a10 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -79,10 +79,10 @@ ChannelView::ChannelView(BaseWidget *parent) this->updateTimer.setSingleShot(true); connect(&this->updateTimer, &QTimer::timeout, this, [this] { if (this->updateQueued) { - this->update(); + this->updateQueued = false; + this->repaint(); + this->updateTimer.start(); } - - this->updateTimer.start(); }); } @@ -99,13 +99,14 @@ ChannelView::~ChannelView() void ChannelView::queueUpdate() { - // if (this->updateTimer.isActive()) { - // this->updateQueued = true; - // } + if (this->updateTimer.isActive()) { + this->updateQueued = true; + return; + } - update(); + this->repaint(); - // this->updateTimer.start(); + this->updateTimer.start(); } void ChannelView::layoutMessages()