mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
LogWidget: Stop update timer when log window is invisible so it doesn't continuously update in the background
This commit is contained in:
parent
7cec8601f1
commit
e746d95d01
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user