From b16db7ca2b714b69de020c0ba841df727110c186 Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Tue, 25 Nov 2014 04:11:46 +0000 Subject: [PATCH] Per discussions with Peter Sampson, at the end of successful Timer Record, save the project. If user hadn't saved it before, will see the Save As dialog. If user had saved it before, it will safely be saved, automatically. --- src/TimerRecordDialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/TimerRecordDialog.cpp b/src/TimerRecordDialog.cpp index fe7bd4ab3..8221d2ee6 100644 --- a/src/TimerRecordDialog.cpp +++ b/src/TimerRecordDialog.cpp @@ -226,9 +226,12 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event)) ///Runs the wait for start dialog. Returns false if the user clicks stop while we are recording ///so that the high +// bool TimerRecordDialog::RunWaitDialog() { + AudacityProject* pProject = GetActiveProject(); int updateResult = eProgressSuccess; + if (m_DateTime_Start > wxDateTime::UNow()) updateResult = this->WaitForStart(); @@ -240,7 +243,6 @@ bool TimerRecordDialog::RunWaitDialog() else { // Record for specified time. - AudacityProject* pProject = GetActiveProject(); pProject->OnRecord(); bool bIsRecording = true; @@ -273,6 +275,12 @@ bool TimerRecordDialog::RunWaitDialog() // Let the caller handle cancellation or failure from recording progress. if (updateResult == eProgressCancelled || updateResult == eProgressFailed) return false; + + // Success, so let's automatically save it, for safety's sake. + // If user hadn't saved it before, they'll see the Save As dialog. + // If user had saved it before, it will safely be saved, automatically. + pProject->Save(); + return true; }