fixed a bug in remote race

This commit is contained in:
Dorian Zedler 2020-10-03 21:47:53 +02:00
parent 9c73623418
commit 53968ae153
Signed by: dorian
GPG key ID: D3B255CB8BC7CD37

View file

@ -100,6 +100,7 @@ void ScStwRemoteRace::handleClientStateChange() {
this->localTimers.clear();
this->localTimers = this->timers;
this->timers.clear();
this->remoteTimers.clear();
break;
case ScStwClient::DISCONNECTED:
foreach(ScStwRemoteTimer *remoteTimer, this->remoteTimers)
@ -185,7 +186,6 @@ void ScStwRemoteRace::refreshDetails(QVariantMap details) {
}
emit this->detailsChanged();
}
void ScStwRemoteRace::rebuildRemoteTimers(QVariantList remoteTimers) {
@ -212,6 +212,7 @@ bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
if(remoteTimers.length() != this->remoteTimers.length()){
// local timers are out of sync
this->rebuildRemoteTimers(remoteTimers);
qDebug() << "rebuilding remote timers";
}
foreach(QVariant remoteTimer, remoteTimers){