mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Minor change in Timer::stop() to avoid calling removeMessagesForTimer() when it's not necessary
This commit is contained in:
parent
92330adc30
commit
3b810701ce
@ -49,13 +49,15 @@ void Timer::start()
|
||||
|
||||
void Timer::stop()
|
||||
{
|
||||
m_running = false;
|
||||
if (m_running) {
|
||||
m_running = false;
|
||||
|
||||
// Remove messages of this timer in the queue. The expected behavior
|
||||
// is that when we stop a timer, we'll not receive more messages
|
||||
// about it (even if there are enqueued messages waiting in the
|
||||
// message queue).
|
||||
Manager::getDefault()->removeMessagesForTimer(this);
|
||||
// Remove messages of this timer in the queue. The expected behavior
|
||||
// is that when we stop a timer, we'll not receive more messages
|
||||
// about it (even if there are enqueued messages waiting in the
|
||||
// message queue).
|
||||
Manager::getDefault()->removeMessagesForTimer(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Timer::tick()
|
||||
|
Loading…
Reference in New Issue
Block a user