forked from mia/Aegisub
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:
parent
8be4101d70
commit
ba3df8b4e5
1 changed files with 5 additions and 0 deletions
|
@ -1081,6 +1081,10 @@ void AudioDisplay::Play(int start,int end) {
|
||||||
if (end >= num_samples) end = num_samples-1;
|
if (end >= num_samples) end = num_samples-1;
|
||||||
if (end < start) end = start;
|
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
|
// Call play
|
||||||
player->Play(start,end-start);
|
player->Play(start,end-start);
|
||||||
wxLogDebug(_T("AudioDisplay::Play: playback started, returning"));
|
wxLogDebug(_T("AudioDisplay::Play: playback started, returning"));
|
||||||
|
@ -1448,6 +1452,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
|
||||||
wxString text = time.GetASSFormated();
|
wxString text = time.GetASSFormated();
|
||||||
|
|
||||||
// Calculate metrics
|
// Calculate metrics
|
||||||
|
// FIXME: Hardcoded font name
|
||||||
wxFont font(10,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,_T("Verdana"));
|
wxFont font(10,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,_T("Verdana"));
|
||||||
dc.SetFont(font);
|
dc.SetFont(font);
|
||||||
int tw,th;
|
int tw,th;
|
||||||
|
|
Loading…
Reference in a new issue