From 9cfff867636486780d89963574dae0028e12a7a5 Mon Sep 17 00:00:00 2001 From: David Bailes Date: Thu, 22 Aug 2019 18:27:11 +0100 Subject: [PATCH] Bug 1548 - Newly recorded tracks do not acquire focus Problem: The previous fix (+ possibly later changes) meant that this was working for mono tracks but not stereo. When recording in a new stereo track, the first track in the project became the focus. The existing code sets the second of the two new tracks to be the focus before the tracks have been grouped into a stereo pair. Fix: Set the first of the new tracks to be the focus. --- src/ProjectAudioManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProjectAudioManager.cpp b/src/ProjectAudioManager.cpp index ecdb792fa..23f0a8e32 100644 --- a/src/ProjectAudioManager.cpp +++ b/src/ProjectAudioManager.cpp @@ -685,10 +685,10 @@ bool ProjectAudioManager::DoRecord(AudacityProject &project, } transportTracks.captureTracks.push_back(newTrack); - // Bug 1548. New track needs the focus. - TrackFocus::Get( *p ).Set( newTrack.get() ); } TrackList::Get( *p ).GroupChannels(*first, recordingChannels); + // Bug 1548. First of new tracks needs the focus. + TrackFocus::Get(*p).Set(first); } //Automated Input Level Adjustment Initialization