1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-21 14:50:06 +02:00

Remove duplicate project pointer

This commit is contained in:
Steve Daulton 2018-05-18 12:13:09 +01:00
parent 41315dac95
commit a2765d013f

View File

@ -917,15 +917,15 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
// normally used for buttons.
// Code from CommandHandler start...
AudacityProject * proj = GetActiveProject();
wxASSERT( proj );
if( !proj )
AudacityProject * p = GetActiveProject();
wxASSERT( p );
if( !p )
return;
CommandFlag flags = AlwaysEnabledFlag; // 0 means recalc flags.
// NB: The call may have the side effect of changing flags.
bool allowed = proj->TryToMakeActionAllowed(
bool allowed = p->TryToMakeActionAllowed(
flags,
AudioIONotBusyFlag | CanStopAudioStreamFlag,
AudioIONotBusyFlag | CanStopAudioStreamFlag);
@ -941,7 +941,6 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
mRecord->PushDown();
return;
}
AudacityProject *p = GetActiveProject();
if( evt.GetInt() == 1 ) // used when called by keyboard shortcut. Default (0) ignored.
mRecord->SetShift(true);