mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01: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();
|
ConnectWidgets();
|
||||||
|
|
||||||
connect(m_timer, &QTimer::timeout, this, &LogWidget::UpdateLog);
|
connect(m_timer, &QTimer::timeout, this, &LogWidget::UpdateLog);
|
||||||
|
connect(this, &QDockWidget::visibilityChanged, [this](bool visible) {
|
||||||
|
if (visible)
|
||||||
m_timer->start(UPDATE_LOG_DELAY);
|
m_timer->start(UPDATE_LOG_DELAY);
|
||||||
|
else
|
||||||
|
m_timer->stop();
|
||||||
|
});
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &LogWidget::UpdateFont);
|
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &LogWidget::UpdateFont);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user