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:
parent
852c07bc58
commit
15d7d4271d
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user