1
0
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:
Paul Licameli
2019-07-07 13:39:16 -04:00
parent 9b98f4be0c
commit bff30b6ae9
6 changed files with 27 additions and 9 deletions

View File

@@ -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"