From 513850f9157613f867d472508dc5d117f39b043e Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 14 Sep 2017 12:09:40 +0200 Subject: [PATCH] try to fix tm thread --- src/gui/components/cc_timer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_timer.cpp b/src/gui/components/cc_timer.cpp index 5f32adf2d..a54c9bfc1 100644 --- a/src/gui/components/cc_timer.cpp +++ b/src/gui/components/cc_timer.cpp @@ -43,11 +43,11 @@ CComponentsTimer::CComponentsTimer(const int& interval, bool is_nano) tm_thread = 0; tm_interval = interval; tm_enable_nano = is_nano; - + tm_enable = false; sl_stop_timer = sigc::mem_fun(*this, &CComponentsTimer::stopTimer); if (interval > 0) - startTimer(); + tm_enable = startTimer(); } CComponentsTimer::~CComponentsTimer() @@ -132,12 +132,11 @@ void CComponentsTimer::stopThread() bool CComponentsTimer::startTimer() { - tm_enable = true; initThread(); if(tm_thread) - return true; + tm_enable = true; - return false; + return tm_enable; } bool CComponentsTimer::stopTimer()