mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
Eliminate idle event handler of CellularPanel...
... achieving the intent of b7386c2db1 by other
means
This commit is contained in:
@@ -314,6 +314,12 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
||||
|
||||
theProject->Bind(EVT_UNDO_RESET, &TrackPanel::OnUndoReset, this);
|
||||
|
||||
wxTheApp->Bind(EVT_AUDIOIO_PLAYBACK,
|
||||
&TrackPanel::OnAudioIO,
|
||||
this);
|
||||
wxTheApp->Bind(EVT_AUDIOIO_CAPTURE,
|
||||
&TrackPanel::OnAudioIO,
|
||||
this);
|
||||
UpdatePrefs();
|
||||
}
|
||||
|
||||
@@ -822,6 +828,15 @@ void TrackPanel::Refresh(bool eraseBackground /* = TRUE */,
|
||||
mRefreshBacking = true;
|
||||
}
|
||||
wxWindow::Refresh(eraseBackground, rect);
|
||||
|
||||
this->CellularPanel::HandleCursorForPresentMouseState();
|
||||
}
|
||||
|
||||
void TrackPanel::OnAudioIO(wxCommandEvent & evt)
|
||||
{
|
||||
evt.Skip();
|
||||
// Some hit tests want to change their cursor to and from the ban symbol
|
||||
CallAfter( [this]{ CellularPanel::HandleCursorForPresentMouseState(); } );
|
||||
}
|
||||
|
||||
#include "TrackPanelDrawingContext.h"
|
||||
|
||||
Reference in New Issue
Block a user