Fix crash when playback cursor leaves the visible part of the audio display on wxMac.
Originally committed to SVN as r1572.
This commit is contained in:
parent
6b4ec2dcc5
commit
6587f4882a
1 changed files with 13 additions and 11 deletions
|
@ -1956,17 +1956,19 @@ void AudioDisplay::OnUpdateTimer(wxTimerEvent &event) {
|
||||||
// Draw cursor
|
// Draw cursor
|
||||||
wxMemoryDC src;
|
wxMemoryDC src;
|
||||||
curpos = GetXAtSample(curPos);
|
curpos = GetXAtSample(curPos);
|
||||||
dc.SetPen(wxPen(Options.AsColour(_T("Audio Play cursor"))));
|
if (curpos >= 0 && curpos < GetClientSize().GetWidth()) {
|
||||||
src.SelectObject(*origImage);
|
dc.SetPen(wxPen(Options.AsColour(_T("Audio Play cursor"))));
|
||||||
if (fullDraw) {
|
src.SelectObject(*origImage);
|
||||||
//dc.Blit(0,0,w,h,&src,0,0);
|
if (fullDraw) {
|
||||||
dc.DrawLine(curpos,0,curpos,h);
|
//dc.Blit(0,0,w,h,&src,0,0);
|
||||||
//dc.Blit(0,0,curpos-10,h,&src,0,0);
|
dc.DrawLine(curpos,0,curpos,h);
|
||||||
//dc.Blit(curpos+10,0,w-curpos-10,h,&src,curpos+10,0);
|
//dc.Blit(0,0,curpos-10,h,&src,0,0);
|
||||||
}
|
//dc.Blit(curpos+10,0,w-curpos-10,h,&src,curpos+10,0);
|
||||||
else {
|
}
|
||||||
dc.Blit(oldCurPos,0,1,h,&src,oldCurPos,0);
|
else {
|
||||||
dc.DrawLine(curpos,0,curpos,h);
|
dc.Blit(oldCurPos,0,1,h,&src,oldCurPos,0);
|
||||||
|
dc.DrawLine(curpos,0,curpos,h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue