mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
Use idle events to update TrackPanel cursor...
... As when recording starts or stops, or the Tools button has changed, or scrolling has changed the results of hit-test. This reduces TrackPanel's intrusions into other code, including ProjectHistory. Also for AdornedRulerPanel, which shares the base class CellularPanel
This commit is contained in:
@@ -103,6 +103,7 @@ BEGIN_EVENT_TABLE(CellularPanel, OverlayPanel)
|
||||
EVT_SET_FOCUS(CellularPanel::OnSetFocus)
|
||||
EVT_KILL_FOCUS(CellularPanel::OnKillFocus)
|
||||
EVT_CONTEXT_MENU(CellularPanel::OnContextMenu)
|
||||
EVT_IDLE(CellularPanel::OnIdle)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
CellularPanel::CellularPanel(
|
||||
@@ -472,6 +473,12 @@ void CellularPanel::OnContextMenu(wxContextMenuEvent & WXUNUSED(event))
|
||||
DoContextMenu();
|
||||
}
|
||||
|
||||
void CellularPanel::OnIdle(wxIdleEvent &event)
|
||||
{
|
||||
event.Skip();
|
||||
HandleCursorForPresentMouseState();
|
||||
}
|
||||
|
||||
/// Handle mouse wheel rotation (for zoom in/out, vertical and horizontal scrolling)
|
||||
void CellularPanel::HandleWheelRotation( TrackPanelMouseEvent &tpmEvent )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user