MCPcopy Create free account
hub / github.com/audacity/audacity / OnIdle

Method OnIdle

src/TrackPanel.cpp:396–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396void TrackPanel::OnIdle(wxIdleEvent& event)
397{
398 event.Skip();
399 // The window must be ready when the timer fires (#1401)
400 if (IsShownOnScreen())
401 {
402 mTimer.Start(std::chrono::milliseconds{kTimerInterval}.count(), FALSE);
403
404 // Timer is started, we don't need the event anymore
405 GetProjectFrame( *GetProject() ).Unbind(wxEVT_IDLE,
406 &TrackPanel::OnIdle, this);
407 }
408 else
409 {
410 // Get another idle event, wx only guarantees we get one
411 // event after "some other normal events occur"
412 event.RequestMore();
413 }
414}
415
416/// AS: This gets called on our wx timer events.
417void TrackPanel::OnTimer(wxTimerEvent& )

Callers

nothing calls this directly

Calls 2

SkipMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected