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

Method Refresh

src/TrackPanel.cpp:819–840  ·  view source on GitHub ↗

This method overrides Refresh() of wxWindow so that the boolean play indicator can be set to false, so that an old play indicator that is no longer there won't get XORed (to erase it), thus redrawing it on the TrackPanel

Source from the content-addressed store, hash-verified

817/// no longer there won't get XORed (to erase it), thus redrawing it on the
818/// TrackPanel
819void TrackPanel::Refresh(bool eraseBackground /* = TRUE */,
820 const wxRect *rect /* = NULL */)
821{
822 // Tell OnPaint() to refresh the backing bitmap.
823 //
824 // Originally I had the check within the OnPaint() routine and it
825 // was working fine. That was until I found that, even though a full
826 // refresh was requested, Windows only set the onscreen portion of a
827 // window as damaged.
828 //
829 // So, if any part of the trackpanel was off the screen, full refreshes
830 // didn't work and the display got corrupted.
831 if( !rect || ( *rect == GetRect() ) )
832 {
833 mRefreshBacking = true;
834 }
835 wxWindow::Refresh(eraseBackground, rect);
836
837 CallAfter([this]{
838 if (GetProject())
839 CellularPanel::HandleCursorForPresentMouseState(); } );
840}
841
842void TrackPanel::OnAudioIO(AudioIOEvent evt)
843{

Callers 15

FilterFilesMethod · 0.45
OnEditParamsMethod · 0.45
OnUsePresetMethod · 0.45
OnTimerMethod · 0.45
OnViewportMessageMethod · 0.45
SelectNoneFunction · 0.45
DoListSelectionFunction · 0.45
UpdateEndMethod · 0.45
RefreshTrackClustersMethod · 0.45
OnTrackChangedMethod · 0.45
OnFocusFunction · 0.45
OnRescanMethod · 0.45

Calls 1

CallAfterFunction · 0.85

Tested by

no test coverage detected