Audio current play position cursor will now always be visible.

Removed video frame/subtitles time sync controls from the grid context menu.

Originally committed to SVN as r210.
This commit is contained in:
Rodrigo Braz Monteiro 2006-03-05 23:01:02 +00:00
parent a7aca18675
commit 6f0073536e
3 changed files with 37 additions and 15 deletions

View File

@ -1470,25 +1470,45 @@ void AudioDisplay::OnUpdateTimer(wxTimerEvent &event) {
// Get DCs // Get DCs
//wxMutexGuiEnter(); //wxMutexGuiEnter();
wxClientDC dc(this); wxClientDC dc(this);
wxMemoryDC src;
src.SelectObject(*origImage);
dc.BeginDrawing(); dc.BeginDrawing();
// Restore background
dc.Blit(oldCurPos,0,1,h,&src,oldCurPos,0);
// Draw cursor // Draw cursor
int curpos = -1; int curpos = -1;
if (player->IsPlaying()) { if (player->IsPlaying()) {
if (player->GetCurrentPosition() > player->GetStartPosition() && player->GetCurrentPosition() < player->GetEndPosition()) { __int64 curPos = player->GetCurrentPosition();
if (curPos > player->GetStartPosition() && curPos < player->GetEndPosition()) {
// Scroll if needed
int posX = GetXAtSample(curPos);
if (posX > w-80) {
UpdatePosition(curPos - samples/2 - 80,true);
UpdateImage();
Refresh(true);
}
// Draw cursor
wxMemoryDC src;
src.SelectObject(*origImage);
dc.Blit(oldCurPos,0,1,h,&src,oldCurPos,0);
dc.SetPen(wxPen(Options.AsColour(_T("Audio Play cursor")))); dc.SetPen(wxPen(Options.AsColour(_T("Audio Play cursor"))));
curpos = GetXAtSample(player->GetCurrentPosition()); curpos = GetXAtSample(curPos);
dc.DrawLine(curpos,0,curpos,h); dc.DrawLine(curpos,0,curpos,h);
} }
else if (player->GetCurrentPosition() > player->GetEndPosition() + 8192) { else {
player->Stop(); if (curPos > player->GetEndPosition() + 8192) {
player->Stop();
}
wxMemoryDC src;
src.SelectObject(*origImage);
dc.Blit(oldCurPos,0,1,h,&src,oldCurPos,0);
} }
} }
// Restore background
else {
wxMemoryDC src;
src.SelectObject(*origImage);
dc.Blit(oldCurPos,0,1,h,&src,oldCurPos,0);
}
oldCurPos = curpos; oldCurPos = curpos;
// Done // Done

View File

@ -62,6 +62,8 @@ Please visit http://aegisub.net to download latest version
- Scrollbar and sliders in audio box can no longer receive focus. (Pomyk) - Scrollbar and sliders in audio box can no longer receive focus. (Pomyk)
- Select lines dialog now has an option on how to deal with comment lines. (Pomyk) - Select lines dialog now has an option on how to deal with comment lines. (Pomyk)
- Last folder for all the file selection dialogs are now remembered in config.dat. (Pomyk) - Last folder for all the file selection dialogs are now remembered in config.dat. (Pomyk)
- Audio current play position cursor will now always be visible. (AMZ)
- Removed video frame/subtitles time sync controls from the grid context menu.
= 1.09 beta - 2006.01.16 =========================== = 1.09 beta - 2006.01.16 ===========================

View File

@ -126,12 +126,12 @@ void SubtitlesGrid::OnPopupMenu() {
menu.AppendSeparator(); menu.AppendSeparator();
// Video/time sync // Video/time sync
state = (video && video->loaded); //state = (video && video->loaded);
menu.Append(MENU_SET_VIDEO_TO_START,_("Jump video to start"),_T("Sets current video time to start time"))->Enable(state); //menu.Append(MENU_SET_VIDEO_TO_START,_("Jump video to start"),_T("Sets current video time to start time"))->Enable(state);
menu.Append(MENU_SET_VIDEO_TO_END,_("Jump video to end"),_T("Sets current video time to end time"))->Enable(state); //menu.Append(MENU_SET_VIDEO_TO_END,_("Jump video to end"),_T("Sets current video time to end time"))->Enable(state);
menu.Append(MENU_SET_START_TO_VIDEO,_("Set start to video"),_T("Sets start times to current video time"))->Enable(state); //menu.Append(MENU_SET_START_TO_VIDEO,_("Set start to video"),_T("Sets start times to current video time"))->Enable(state);
menu.Append(MENU_SET_END_TO_VIDEO,_("Set end to video"),_T("Sets end times to current video time"))->Enable(state); //menu.Append(MENU_SET_END_TO_VIDEO,_("Set end to video"),_T("Sets end times to current video time"))->Enable(state);
menu.AppendSeparator(); //menu.AppendSeparator();
// Duplicate selection // Duplicate selection
menu.Append(MENU_DUPLICATE,_("&Duplicate"),_T("Duplicate the selected lines"))->Enable(continuous); menu.Append(MENU_DUPLICATE,_("&Duplicate"),_T("Duplicate the selected lines"))->Enable(continuous);