1
0
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:
Paul Licameli
2019-06-12 11:04:38 -04:00
parent 702199f9d9
commit b7386c2db1
11 changed files with 11 additions and 53 deletions

View File

@@ -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 )
{