GH-1652 set instance running status before notifying event listeners

This commit is contained in:
Petr Mrázek 2016-10-29 02:19:42 +02:00
parent 2b9017a69c
commit deabfa78f8

View File

@ -118,6 +118,8 @@ void BaseInstance::setRunning(bool running)
if(running == m_isRunning)
return;
m_isRunning = running;
if(running)
{
m_timeStarted = QDateTime::currentDateTime();
@ -129,7 +131,6 @@ void BaseInstance::setRunning(bool running)
settings()->set("totalTimePlayed", current + m_timeStarted.secsTo(timeEnded));
emit propertiesChanged(this);
}
m_isRunning = running;
emit runningStatusChanged(running);
}