mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-03 17:19:43 +02:00
Bug1282: Hide "Stereo to Mono" from menu when disabled by plugin manager...
... so you can't crash by selecting it!
This commit is contained in:
parent
ca6fbfad4d
commit
2550a59c0e
@ -849,9 +849,16 @@ void AudacityProject::CreateMenusAndCommands()
|
||||
|
||||
c->AddSeparator();
|
||||
|
||||
c->AddItem(wxT("Stereo to Mono"), _("Stereo Trac&k to Mono"), FN(OnStereoToMono),
|
||||
AudioIONotBusyFlag | StereoRequiredFlag | WaveTracksSelectedFlag,
|
||||
AudioIONotBusyFlag | StereoRequiredFlag | WaveTracksSelectedFlag);
|
||||
{
|
||||
// Stereo to Mono is an oddball command that is also subject to control by the
|
||||
// plug-in manager, as if an effect. Decide whether to show or hide it.
|
||||
const PluginID ID = EffectManager::Get().GetEffectByIdentifier(wxT("StereoToMono"));
|
||||
const PluginDescriptor *plug = PluginManager::Get().GetPlugin(ID);
|
||||
if (plug)
|
||||
c->AddItem(wxT("Stereo to Mono"), _("Stereo Trac&k to Mono"), FN(OnStereoToMono),
|
||||
AudioIONotBusyFlag | StereoRequiredFlag | WaveTracksSelectedFlag,
|
||||
AudioIONotBusyFlag | StereoRequiredFlag | WaveTracksSelectedFlag);
|
||||
}
|
||||
c->AddItem(wxT("MixAndRender"), _("Mi&x and Render"), FN(OnMixAndRender),
|
||||
AudioIONotBusyFlag | WaveTracksSelectedFlag,
|
||||
AudioIONotBusyFlag | WaveTracksSelectedFlag);
|
||||
@ -3298,7 +3305,9 @@ void AudacityProject::OnZeroCrossing()
|
||||
bool AudacityProject::OnEffect(const PluginID & ID, int flags)
|
||||
{
|
||||
const PluginDescriptor *plug = PluginManager::Get().GetPlugin(ID);
|
||||
wxASSERT(plug != NULL);
|
||||
if (!plug)
|
||||
return false;
|
||||
|
||||
EffectType type = plug->GetEffectType();
|
||||
|
||||
// Make sure there's no activity since the effect is about to be applied
|
||||
|
Loading…
x
Reference in New Issue
Block a user