mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00: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
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
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);
|
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &LogWidget::UpdateFont);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue