1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-23 15:41:09 +02:00

Bug 1560 - RTP effects: Repeatable crash using Track Dropdown Menu to split during transport

Fixed by disabling some menu items during realtime preview.
This commit is contained in:
Steve the Fiddle 2016-12-16 22:53:54 +00:00 committed by James Crook
parent 0d5cb77e3d
commit 14c706e16b

View File

@ -7741,10 +7741,12 @@ void TrackPanel::OnTrackMenu(Track *t)
(next && isMono && !next->GetLinked() &&
next->GetKind() == Track::Wave);
theMenu->Enable(OnSwapChannelsID, t->GetLinked());
theMenu->Enable(OnMergeStereoID, canMakeStereo);
theMenu->Enable(OnSplitStereoID, t->GetLinked());
theMenu->Enable(OnSplitStereoMonoID, t->GetLinked());
// Unsafe to change channels during real-time preview (bug 1560)
bool unsafe = EffectManager::Get().RealtimeIsActive() && IsUnsafe();
theMenu->Enable(OnSwapChannelsID, t->GetLinked() && !unsafe);
theMenu->Enable(OnMergeStereoID, canMakeStereo && !unsafe);
theMenu->Enable(OnSplitStereoID, t->GetLinked() && !unsafe);
theMenu->Enable(OnSplitStereoMonoID, t->GetLinked() && !unsafe);
// We only need to set check marks. Clearing checks causes problems on Linux (bug 851)
// + Setting unchecked items to false is to get round a linux bug
@ -7786,7 +7788,7 @@ void TrackPanel::OnTrackMenu(Track *t)
SetMenuCheck(*mRateMenu, IdOfRate((int) track->GetRate()));
SetMenuCheck(*mFormatMenu, IdOfFormat(track->GetSampleFormat()));
bool unsafe = IsUnsafe();
unsafe = IsUnsafe();
for (int i = OnRate8ID; i <= OnFloatID; i++) {
theMenu->Enable(i, !unsafe);
}