Fix #598, repaint the audio display upon playback to get rid of any junk on it.

Originally committed to SVN as r3022.
This commit is contained in:
Niels Martin Hansen 2009-06-06 02:32:31 +00:00
parent 0f2d39e28f
commit d56b5b1bf6
1 changed files with 5 additions and 0 deletions

View File

@ -1081,6 +1081,10 @@ void AudioDisplay::Play(int start,int end) {
if (end >= num_samples) end = num_samples-1;
if (end < start) end = start;
// Redraw the image to avoid any junk left over from mouse movements etc
// See issue #598
UpdateImage(true);
// Call play
player->Play(start,end-start);
wxLogDebug(_T("AudioDisplay::Play: playback started, returning"));
@ -1448,6 +1452,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
wxString text = time.GetASSFormated();
// Calculate metrics
// FIXME: Hardcoded font name
wxFont font(10,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,_T("Verdana"));
dc.SetFont(font);
int tw,th;