1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

Bug2109 residual: apply fix also in case of import of MIDI...

... Muting the new track, in case any solo track already existed.
This commit is contained in:
Paul Licameli
2020-11-10 16:10:27 -05:00
parent 003d1c23a3
commit 791dbea1af
2 changed files with 11 additions and 9 deletions

View File

@@ -44,6 +44,14 @@ bool DoImportMIDI( AudacityProject &project, const FilePath &fileName )
auto pTrack = tracks.Add( newTrack );
pTrack->SetSelected(true);
// Fix the bug 2109.
// In case the project had soloed tracks before importing,
// the newly imported track is muted.
const bool projectHasSolo =
!(tracks.Any<PlayableTrack>() + &PlayableTrack::GetSolo).empty();
if (projectHasSolo)
pTrack->SetMute(true);
ProjectHistory::Get( project )
.PushState(
XO("Imported MIDI from '%s'").Format( fileName ),