Skip to content

Commit

Permalink
Issue 6340: wrong vertical scroll recording to new track...
Browse files Browse the repository at this point in the history
... Solution is to delay the scrolling until after TrackListEvent subscriptions
fire and update the cumulative ChannelView heights.
  • Loading branch information
Paul-Licameli authored and LWinterberg committed Apr 29, 2024
1 parent 1ad862a commit 3fdfa8f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ProjectAudioManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,15 @@ bool ProjectAudioManager::DoRecord(AudacityProject &project,
pendingTracks.RegisterPendingNewTracks(std::move(*newTracks));
// Bug 1548. First of new tracks needs the focus.
TrackFocus::Get(project).Set(first);
if (!trackList.empty())
Viewport::Get(project).ShowTrack(**trackList.rbegin());
if (!trackList.empty()) {
BasicUI::CallAfter([pProject = project.weak_from_this()]{
if (!pProject.expired()) {
auto &project = *pProject.lock();
auto &trackList = TrackList::Get(project);
Viewport::Get(project).ShowTrack(**trackList.rbegin());
}
});
}
}

//Automated Input Level Adjustment Initialization
Expand Down

0 comments on commit 3fdfa8f

Please sign in to comment.