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
| 817 | /// no longer there won't get XORed (to erase it), thus redrawing it on the |
| 818 | /// TrackPanel |
| 819 | void 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 | |
| 842 | void TrackPanel::OnAudioIO(AudioIOEvent evt) |
| 843 | { |
no test coverage detected