mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 00:51:13 +02:00
possible fix for bug 1250
Go back to having both mono and stereo items in track menu.
This commit is contained in:
parent
162392e8cf
commit
ba3b1b14ae
@ -531,7 +531,6 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
||||
|
||||
mWaveTrackMenu = NULL;
|
||||
mChannelItemsInsertionPoint = 0;
|
||||
mShowMono = false;
|
||||
|
||||
mNoteTrackMenu = NULL;
|
||||
mLabelTrackMenu = NULL;
|
||||
@ -761,9 +760,11 @@ void TrackPanel::BuildMenus(void)
|
||||
mWaveTrackMenu->Append(OnSpectrogramSettingsID, _("S&pectrogram Settings..."));
|
||||
mWaveTrackMenu->AppendSeparator();
|
||||
|
||||
// include both mono and stereo items as a work around for bug 1250
|
||||
mChannelItemsInsertionPoint = mWaveTrackMenu->GetMenuItemCount();
|
||||
ShowMonoItems(mWaveTrackMenu, mChannelItemsInsertionPoint);
|
||||
mShowMono = true;
|
||||
mChannelItemsInsertionPoint = mWaveTrackMenu->GetMenuItemCount();
|
||||
ShowStereoItems(mWaveTrackMenu, mChannelItemsInsertionPoint);
|
||||
mWaveTrackMenu->AppendSeparator();
|
||||
|
||||
mWaveTrackMenu->Append(0, _("&Format"), mFormatMenu);
|
||||
@ -8300,33 +8301,26 @@ void TrackPanel::OnTrackMenu(Track *t)
|
||||
(next && isMono && !next->GetLinked() &&
|
||||
next->GetKind() == Track::Wave);
|
||||
|
||||
if (isMono != mShowMono) {
|
||||
if (isMono) {
|
||||
HideStereoItems(theMenu);
|
||||
ShowMonoItems(theMenu, mChannelItemsInsertionPoint);
|
||||
}
|
||||
else {
|
||||
HideMonoItems(theMenu);
|
||||
ShowStereoItems(theMenu, mChannelItemsInsertionPoint);
|
||||
}
|
||||
mShowMono = isMono;
|
||||
theMenu->Enable(OnSwapChannelsID, t->GetLinked());
|
||||
theMenu->Enable(OnMergeStereoID, canMakeStereo);
|
||||
theMenu->Enable(OnSplitStereoID, t->GetLinked());
|
||||
theMenu->Enable(OnSplitStereoMonoID, t->GetLinked());
|
||||
|
||||
// We only need to set check marks. Clearing checks causes problems on Linux (bug 851)
|
||||
switch (t->GetChannel()) {
|
||||
case Track::LeftChannel:
|
||||
theMenu->Check(OnChannelLeftID, true);
|
||||
break;
|
||||
case Track::RightChannel:
|
||||
theMenu->Check(OnChannelRightID, true);
|
||||
break;
|
||||
default:
|
||||
theMenu->Check(OnChannelMonoID, true);
|
||||
}
|
||||
|
||||
if (isMono) {
|
||||
theMenu->Enable(OnMergeStereoID, canMakeStereo);
|
||||
|
||||
// We only need to set check marks. Clearing checks causes problems on Linux (bug 851)
|
||||
switch (t->GetChannel()) {
|
||||
case Track::LeftChannel:
|
||||
theMenu->Check(OnChannelLeftID, true);
|
||||
break;
|
||||
case Track::RightChannel:
|
||||
theMenu->Check(OnChannelRightID, true);
|
||||
break;
|
||||
default:
|
||||
theMenu->Check(OnChannelMonoID, true);
|
||||
}
|
||||
}
|
||||
theMenu->Enable(OnChannelMonoID, !t->GetLinked());
|
||||
theMenu->Enable(OnChannelLeftID, !t->GetLinked());
|
||||
theMenu->Enable(OnChannelRightID, !t->GetLinked());
|
||||
|
||||
WaveTrack *const track = (WaveTrack *)t;
|
||||
const int display = track->GetDisplay();
|
||||
|
@ -842,7 +842,6 @@ protected:
|
||||
|
||||
wxMenu *mWaveTrackMenu;
|
||||
size_t mChannelItemsInsertionPoint;
|
||||
bool mShowMono;
|
||||
|
||||
wxMenu *mNoteTrackMenu;
|
||||
wxMenu *mTimeTrackMenu;
|
||||
|
Loading…
x
Reference in New Issue
Block a user