X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAircraft%2Freplay.cxx;h=f44d38b88234f743dcf5c45040d7b0fd7c74e22e;hb=f6207d5cb8eeb2ed83e1873dd2f621785832a3f3;hp=702a8f9137ef4935cc0a8799e0bf048670a5456d;hpb=5c3b6a2cc4a741fd886ae151291c7daffc807946;p=flightgear.git diff --git a/src/Aircraft/replay.cxx b/src/Aircraft/replay.cxx index 702a8f913..f44d38b88 100644 --- a/src/Aircraft/replay.cxx +++ b/src/Aircraft/replay.cxx @@ -302,7 +302,8 @@ FGReplay::update( double dt ) { // replay active double current_time = replay_time->getDoubleValue(); - if (current_time<=0.0) + bool ResetTime = (current_time<=0.0); + if (ResetTime) { // initialize start time double startTime = get_start_time(); @@ -325,6 +326,11 @@ FGReplay::update( double dt ) char StrBuffer[30]; printTimeStr(StrBuffer,current_time); replay_time_str->setStringValue((const char*)StrBuffer); + + // when time skipped (looped replay), trigger listeners to reset views etc + if (ResetTime) + replay_master->setIntValue(replay_state); + return; // don't record the replay session } case 2: // normal replay operation