forked from mia/Aegisub
Use VideoContext::JumpToTime where appropriate
Originally committed to SVN as r4522.
This commit is contained in:
parent
0e155767ae
commit
c7ea710267
4 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue