fixed a bug in remote race
This commit is contained in:
parent
9c73623418
commit
53968ae153
1 changed files with 2 additions and 1 deletions
|
@ -100,6 +100,7 @@ void ScStwRemoteRace::handleClientStateChange() {
|
||||||
this->localTimers.clear();
|
this->localTimers.clear();
|
||||||
this->localTimers = this->timers;
|
this->localTimers = this->timers;
|
||||||
this->timers.clear();
|
this->timers.clear();
|
||||||
|
this->remoteTimers.clear();
|
||||||
break;
|
break;
|
||||||
case ScStwClient::DISCONNECTED:
|
case ScStwClient::DISCONNECTED:
|
||||||
foreach(ScStwRemoteTimer *remoteTimer, this->remoteTimers)
|
foreach(ScStwRemoteTimer *remoteTimer, this->remoteTimers)
|
||||||
|
@ -185,7 +186,6 @@ void ScStwRemoteRace::refreshDetails(QVariantMap details) {
|
||||||
}
|
}
|
||||||
|
|
||||||
emit this->detailsChanged();
|
emit this->detailsChanged();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScStwRemoteRace::rebuildRemoteTimers(QVariantList remoteTimers) {
|
void ScStwRemoteRace::rebuildRemoteTimers(QVariantList remoteTimers) {
|
||||||
|
@ -212,6 +212,7 @@ bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
|
||||||
if(remoteTimers.length() != this->remoteTimers.length()){
|
if(remoteTimers.length() != this->remoteTimers.length()){
|
||||||
// local timers are out of sync
|
// local timers are out of sync
|
||||||
this->rebuildRemoteTimers(remoteTimers);
|
this->rebuildRemoteTimers(remoteTimers);
|
||||||
|
qDebug() << "rebuilding remote timers";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(QVariant remoteTimer, remoteTimers){
|
foreach(QVariant remoteTimer, remoteTimers){
|
||||||
|
|
Reference in a new issue