GH-1652 set instance running status before notifying event listeners
This commit is contained in:
parent
2b9017a69c
commit
deabfa78f8
@ -118,6 +118,8 @@ void BaseInstance::setRunning(bool running)
|
|||||||
if(running == m_isRunning)
|
if(running == m_isRunning)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_isRunning = running;
|
||||||
|
|
||||||
if(running)
|
if(running)
|
||||||
{
|
{
|
||||||
m_timeStarted = QDateTime::currentDateTime();
|
m_timeStarted = QDateTime::currentDateTime();
|
||||||
@ -129,7 +131,6 @@ void BaseInstance::setRunning(bool running)
|
|||||||
settings()->set("totalTimePlayed", current + m_timeStarted.secsTo(timeEnded));
|
settings()->set("totalTimePlayed", current + m_timeStarted.secsTo(timeEnded));
|
||||||
emit propertiesChanged(this);
|
emit propertiesChanged(this);
|
||||||
}
|
}
|
||||||
m_isRunning = running;
|
|
||||||
|
|
||||||
emit runningStatusChanged(running);
|
emit runningStatusChanged(running);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user