From 4da9e41e0376ac26c65d18c9557faf691bc06457 Mon Sep 17 00:00:00 2001 From: James Crook Date: Sun, 17 Dec 2017 16:49:35 +0000 Subject: [PATCH] Bug 1799 - Un-muting with a single track unnecessarily activates the Solo button --- src/Project.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Project.cpp b/src/Project.cpp index 0ff601c1f..e07646073 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -5566,12 +5566,15 @@ void AudacityProject::HandleTrackMute(Track *t, const bool exclusive) TrackListIterator iter(GetTracks()); Track *i = iter.First(); int nPlaying=0; + int nPlayableTracks =0; // We also set a solo indicator if we have just one track / stereo pair playing. + // in a group of more than one playable tracks. // otherwise clear solo on everything. while (i) { auto pi = dynamic_cast( i ); if (pi) { + nPlayableTracks++; if( !pi->GetMute()) { nPlaying += 1; @@ -5586,7 +5589,7 @@ void AudacityProject::HandleTrackMute(Track *t, const bool exclusive) while (i) { auto pi = dynamic_cast( i ); if (pi) - pi->SetSolo( (nPlaying==1) && !pi->GetMute() ); // will set both of a stereo pair + pi->SetSolo( (nPlaying==1) && (nPlayableTracks > 1 ) && !pi->GetMute() ); // will set both of a stereo pair i = iter.Next(); } }