Use VideoContext::JumpToTime where appropriate

Originally committed to SVN as r4522.
This commit is contained in:
Thomas Goyne 2010-06-16 06:19:49 +00:00
parent 0e155767ae
commit c7ea710267
4 changed files with 5 additions and 7 deletions

View file

@ -716,7 +716,7 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
// Normal click
if ((click || dclick) && !shift && !ctrl && !alt) {
editBox->SetToLine(row);
if (dclick) VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(GetDialogue(row)->Start.GetMS(),true));
if (dclick) VideoContext::Get()->JumpToTime(GetDialogue(row)->Start.GetMS());
SelectRow(row,false);
parentFrame->UpdateToolbar();
lastRow = row;

View file

@ -56,7 +56,6 @@
#include "subs_edit_box.h"
#include "subs_grid.h"
#include "utils.h"
#include "vfr.h"
#include "video_context.h"
#include "video_display.h"
@ -214,7 +213,7 @@ void DialogStyling::JumpToLine(int n) {
grid->editBox->SetToLine(linen);
// Update display
if (PreviewCheck->IsChecked()) VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(line->Start.GetMS(),true));
if (PreviewCheck->IsChecked()) VideoContext::Get()->JumpToTime(line->Start.GetMS());
}

View file

@ -63,7 +63,6 @@
#include "tooltip_manager.h"
#include "utils.h"
#include "validators.h"
#include "vfr.h"
#include "video_context.h"
#include "video_display.h"
@ -377,7 +376,7 @@ void SubsEditBox::SetToLine(int n,bool weak) {
if (sync) {
VideoContext::Get()->Stop();
AssDialogue *cur = grid->GetDialogue(n);
if (cur) VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(cur->Start.GetMS(),true));
if (cur) VideoContext::Get()->JumpToTime(cur->Start.GetMS());
}
}
@ -592,7 +591,7 @@ void SubsEditBox::SetControlsState (bool state) {
/// @brief Disables or enables frame timing
///
void SubsEditBox::UpdateFrameTiming () {
if (VFR_Output.IsLoaded()) ByFrame->Enable(enabled);
if (VideoContext::Get()->IsLoaded()) ByFrame->Enable(enabled);
else {
ByFrame->Enable(false);
ByTime->SetValue(true);

View file

@ -1547,7 +1547,7 @@ void SubtitlesGrid::SetVideoToSubs(bool start) {
AssDialogue *cur = GetDialogue(sel[0]);
if (cur) {
if (start)
VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(cur->Start.GetMS(),true));
VideoContext::Get()->JumpToTime(cur->Start.GetMS());
else
VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(cur->End.GetMS(),false));
}