Skip to content
Permalink
Browse files

LogWidget: Stop update timer when log window is invisible so it doesn…

…'t continuously update in the background
  • Loading branch information...
CookiePLMonster committed Aug 30, 2019
1 parent 7cec860 commit e746d95d01bc7e36de82f66be9d082ceba8be446
Showing with 6 additions and 1 deletion.
  1. +6 −1 Source/Core/DolphinQt/Config/LogWidget.cpp
@@ -46,7 +46,12 @@ LogWidget::LogWidget(QWidget* parent) : QDockWidget(parent), m_timer(new QTimer(
ConnectWidgets();

connect(m_timer, &QTimer::timeout, this, &LogWidget::UpdateLog);
m_timer->start(UPDATE_LOG_DELAY);
connect(this, &QDockWidget::visibilityChanged, [this](bool visible) {
if (visible)
m_timer->start(UPDATE_LOG_DELAY);
else
m_timer->stop();
});

connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &LogWidget::UpdateFont);

0 comments on commit e746d95

Please sign in to comment.
You can’t perform that action at this time.