diff --git a/src/Menus.cpp b/src/Menus.cpp index bb6b8e402..c0a625168 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -6570,11 +6570,8 @@ void AudacityProject::OnTimerRecord() switch (iTimerRecordingOutcome) { case POST_TIMER_RECORD_CANCEL_WAIT: // Canceled on the wait dialog - if (GetUndoManager()->UndoAvailable()) { - // MY: We need to roll back what changes we have made here - OnUndo(); - } - break; + RollbackState(); + break; case POST_TIMER_RECORD_CANCEL: // RunWaitDialog() shows the "wait for start" as well as "recording" dialog // if it returned POST_TIMER_RECORD_CANCEL it means the user cancelled while the recording, so throw out the fresh track. @@ -6582,26 +6579,26 @@ void AudacityProject::OnTimerRecord() // which is blocked by this function. // so instead we mark a flag to undo it there. mTimerRecordCanceled = true; - break; + break; case POST_TIMER_RECORD_NOTHING: // No action required - break; + break; case POST_TIMER_RECORD_CLOSE: // Quit Audacity exit(0); - break; + break; case POST_TIMER_RECORD_RESTART: // Restart System #ifdef __WINDOWS__ system("shutdown /r /f /t 30"); #endif - break; + break; case POST_TIMER_RECORD_SHUTDOWN: // Shutdown System #ifdef __WINDOWS__ system("shutdown /s /f /t 30"); #endif - break; + break; } } }