From 84b5cee7d826644701973b73ed7536be8a9288ff Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 25 Sep 2014 03:13:45 +0200 Subject: [PATCH] Fixed / Improved timer handling in timer based component --- src/blackgui/components/timerbasedcomponent.cpp | 1 + src/blackgui/components/timerbasedcomponent.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blackgui/components/timerbasedcomponent.cpp b/src/blackgui/components/timerbasedcomponent.cpp index 9154080bb..07696a405 100644 --- a/src/blackgui/components/timerbasedcomponent.cpp +++ b/src/blackgui/components/timerbasedcomponent.cpp @@ -46,6 +46,7 @@ namespace BlackGui void CTimerBasedComponent::fireTimer() { Q_ASSERT(this->m_timerSingleShot); + this->m_timer->start(); // restart other timer this->m_timerSingleShot->start(10); } } diff --git a/src/blackgui/components/timerbasedcomponent.h b/src/blackgui/components/timerbasedcomponent.h index 79f0dfdcf..86a28790e 100644 --- a/src/blackgui/components/timerbasedcomponent.h +++ b/src/blackgui/components/timerbasedcomponent.h @@ -46,7 +46,7 @@ namespace BlackGui void setUpdateIntervalSeconds(int seconds) { this->setUpdateInterval(1000 * seconds); } //! Stop timer - void stopTimer() { this->setUpdateInterval(-1); } + void stopTimer() { this->setUpdateInterval(-1); this->m_timerSingleShot->stop(); } //! Fire the timer straight away void fireTimer();