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

Eliminate GetActiveProject from src/ondemand

This commit is contained in:
Paul Licameli 2020-01-07 16:08:36 -05:00
parent 852c07bc58
commit 15d7d4271d
3 changed files with 3 additions and 5 deletions

View File

@ -306,7 +306,7 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
this);
auto theProject = GetProject();
theProject->Bind(EVT_ODTASK_UPDATE, &TrackPanel::OnODTask, this);
wxTheApp->Bind(EVT_ODTASK_UPDATE, &TrackPanel::OnODTask, this);
theProject->Bind(EVT_ODTASK_COMPLETE, &TrackPanel::OnODTask, this);
theProject->Bind(
EVT_PROJECT_SETTINGS_CHANGE, &TrackPanel::OnProjectSettingsChange, this);

View File

@ -421,10 +421,7 @@ void ODManager::Start()
{
mNeedsDraw=0;
wxCommandEvent event( EVT_ODTASK_UPDATE );
ODLocker locker{ &AllProjects::Mutex() };
AudacityProject* proj = GetActiveProject();
if(proj)
proj->wxEvtHandler::AddPendingEvent(event);
wxTheApp->AddPendingEvent(event);
}
mTerminateMutex.Lock();
}

View File

@ -30,6 +30,7 @@ number of threads.
#include <time.h>
#endif //__WXMAC__
// This event is posted to the application
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
EVT_ODTASK_UPDATE, wxCommandEvent);