From 204aa37716ed3d8d09682fbe8bf02ebc84b2c747 Mon Sep 17 00:00:00 2001 From: lllucius Date: Mon, 29 Dec 2014 20:26:07 +0000 Subject: [PATCH] Only push state if recording, not when monitoring --- src/Project.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Project.cpp b/src/Project.cpp index 842264438..43cad534d 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -4725,14 +4725,18 @@ void AudacityProject::OnAudioIOStartRecording() // This is called after recording has stopped and all tracks have flushed. void AudacityProject::OnAudioIOStopRecording() { - // Add to history - PushState(_("Recorded Audio"), _("Record")); - - // Reset timer record - if (IsTimerRecordCancelled()) + // Only push state if we were capturing and not monitoring + if (GetAudioIOToken() > 0) { - OnUndo(); - ResetTimerRecordFlag(); + // Add to history + PushState(_("Recorded Audio"), _("Record")); + + // Reset timer record + if (IsTimerRecordCancelled()) + { + OnUndo(); + ResetTimerRecordFlag(); + } } // Refresh the project window