From d56b5b1bf66ada6bc4180a0d3fc9defaed3d7bc4 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sat, 6 Jun 2009 02:32:31 +0000 Subject: [PATCH] Fix #598, repaint the audio display upon playback to get rid of any junk on it. Originally committed to SVN as r3022. --- aegisub/src/audio_display.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index 198f54573..268f7d2af 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -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;