From f37645554ce97026869563aedea8f8c6133d8044 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 23 Nov 2012 13:39:53 +0200 Subject: CHUI-528, CHUI-536, CHUI-538, CHUI-540 ADD. FIX (Built single processor of different types of notifications): repaired LLFlashTimer --- indra/llui/llflashtimer.cpp | 19 +++++++++++++++---- indra/llui/llflashtimer.h | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp index 2ad86b5751..de7a4ab265 100644 --- a/indra/llui/llflashtimer.cpp +++ b/indra/llui/llflashtimer.cpp @@ -34,6 +34,7 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) , mCallback(cb) , mCurrentTickCount(0) , mIsFlashingInProgress(false) + , mIsCurrentlyHighlighted(false) { mEventTimer.stop(); @@ -58,9 +59,7 @@ BOOL LLFlashTimer::tick() if (++mCurrentTickCount >= mFlashCount) { - mEventTimer.stop(); - mCurrentTickCount = 0; - mIsFlashingInProgress = false; + stopFlashing(); } return FALSE; @@ -69,14 +68,26 @@ BOOL LLFlashTimer::tick() void LLFlashTimer::startFlashing() { mIsFlashingInProgress = true; + mIsCurrentlyHighlighted = true; mEventTimer.start(); } void LLFlashTimer::stopFlashing() { + mEventTimer.stop(); mIsFlashingInProgress = false; mIsCurrentlyHighlighted = false; - mEventTimer.stop(); + mCurrentTickCount = 0; +} + +bool LLFlashTimer::isFlashingInProgress() +{ + return mIsFlashingInProgress; +} + +bool LLFlashTimer::isCurrentlyHighlighted() +{ + return mIsCurrentlyHighlighted; } diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h index 538ee0fcca..5c8860b097 100644 --- a/indra/llui/llflashtimer.h +++ b/indra/llui/llflashtimer.h @@ -50,8 +50,8 @@ public: void startFlashing(); void stopFlashing(); - bool isFlashingInProgress() {return mIsFlashingInProgress;} - bool isCurrentlyHighlighted() {return mIsCurrentlyHighlighted;} + bool isFlashingInProgress(); + bool isCurrentlyHighlighted(); private: callback_t mCallback; -- cgit v1.2.3