forked from mia/Aegisub
Modified Harukalover's patch from yesterday so the frame number is sanitized after entry, not during.
Originally committed to SVN as r2722.
This commit is contained in:
parent
6a765528e1
commit
f530b4c0da
1 changed files with 3 additions and 2 deletions
|
@ -127,6 +127,7 @@ void DialogJumpTo::OnOK (wxCommandEvent &event) { OnClose(true); }
|
|||
// On Key pressed
|
||||
void DialogJumpTo::OnKey(wxCommandEvent &event) {
|
||||
EndModal(0);
|
||||
if (jumpframe > VideoContext::Get()->GetLength()-1) jumpframe = VideoContext::Get()->GetLength()-1;
|
||||
VideoContext::Get()->JumpToFrame(jumpframe);
|
||||
}
|
||||
|
||||
|
@ -135,6 +136,7 @@ void DialogJumpTo::OnKey(wxCommandEvent &event) {
|
|||
// On OK button pressed
|
||||
void DialogJumpTo::OnClose(bool ok) {
|
||||
EndModal(0);
|
||||
if (jumpframe > VideoContext::Get()->GetLength()-1) jumpframe = VideoContext::Get()->GetLength()-1;
|
||||
if (ok) VideoContext::Get()->JumpToFrame(jumpframe);
|
||||
}
|
||||
|
||||
|
@ -147,7 +149,6 @@ void DialogJumpTo::OnEditTime (wxCommandEvent &event) {
|
|||
|
||||
// Update frame
|
||||
long newframe = VFR_Output.GetFrameAtTime(JumpTime->time.GetMS());
|
||||
if (newframe > VideoContext::Get()->GetLength()-1) newframe = VideoContext::Get()->GetLength()-1;
|
||||
if (jumpframe != newframe) {
|
||||
jumpframe = newframe;
|
||||
JumpFrame->SetValue(wxString::Format(_T("%i"),jumpframe));
|
||||
|
@ -167,7 +168,7 @@ void DialogJumpTo::OnEditFrame (wxCommandEvent &event) {
|
|||
|
||||
// Update frame
|
||||
JumpFrame->GetValue().ToLong(&jumpframe);
|
||||
if (jumpframe > VideoContext::Get()->GetLength()-1) jumpframe = VideoContext::Get()->GetLength()-1;
|
||||
|
||||
JumpFrame->SetValue(wxString::Format(_T("%i"),jumpframe));
|
||||
|
||||
// Update time
|
||||
|
|
Loading…
Reference in a new issue