forked from mia/Aegisub
Minor cosmetic fixes to the goto frame/time dialog box. Patch by Harukalover.
Originally committed to SVN as r2720.
This commit is contained in:
parent
ff7776233a
commit
d9d0eddfde
2 changed files with 5 additions and 3 deletions
|
@ -68,7 +68,7 @@ DialogJumpTo::DialogJumpTo (wxWindow *parent)
|
||||||
// Set initial values
|
// Set initial values
|
||||||
ready = false;
|
ready = false;
|
||||||
jumpframe = VideoContext::Get()->GetFrameN();
|
jumpframe = VideoContext::Get()->GetFrameN();
|
||||||
jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe));
|
jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe,true,true));
|
||||||
|
|
||||||
// Times
|
// Times
|
||||||
wxStaticText *LabelFrame = new wxStaticText(this,-1,_("Frame: "),wxDefaultPosition,wxSize(60,20));
|
wxStaticText *LabelFrame = new wxStaticText(this,-1,_("Frame: "),wxDefaultPosition,wxSize(60,20));
|
||||||
|
@ -147,6 +147,7 @@ void DialogJumpTo::OnEditTime (wxCommandEvent &event) {
|
||||||
|
|
||||||
// Update frame
|
// Update frame
|
||||||
long newframe = VFR_Output.GetFrameAtTime(JumpTime->time.GetMS());
|
long newframe = VFR_Output.GetFrameAtTime(JumpTime->time.GetMS());
|
||||||
|
if (newframe > VideoContext::Get()->GetLength()-1) newframe = VideoContext::Get()->GetLength()-1;
|
||||||
if (jumpframe != newframe) {
|
if (jumpframe != newframe) {
|
||||||
jumpframe = newframe;
|
jumpframe = newframe;
|
||||||
JumpFrame->SetValue(wxString::Format(_T("%i"),jumpframe));
|
JumpFrame->SetValue(wxString::Format(_T("%i"),jumpframe));
|
||||||
|
@ -166,10 +167,11 @@ void DialogJumpTo::OnEditFrame (wxCommandEvent &event) {
|
||||||
|
|
||||||
// Update frame
|
// Update frame
|
||||||
JumpFrame->GetValue().ToLong(&jumpframe);
|
JumpFrame->GetValue().ToLong(&jumpframe);
|
||||||
|
if (jumpframe > VideoContext::Get()->GetLength()-1) jumpframe = VideoContext::Get()->GetLength()-1;
|
||||||
JumpFrame->SetValue(wxString::Format(_T("%i"),jumpframe));
|
JumpFrame->SetValue(wxString::Format(_T("%i"),jumpframe));
|
||||||
|
|
||||||
// Update time
|
// Update time
|
||||||
int newtime = VFR_Output.GetTimeAtFrame(jumpframe);
|
int newtime = VFR_Output.GetTimeAtFrame(jumpframe,true,true);
|
||||||
if (jumptime.GetMS() != newtime) {
|
if (jumptime.GetMS() != newtime) {
|
||||||
jumptime.SetMS(newtime);
|
jumptime.SetMS(newtime);
|
||||||
JumpTime->SetValue(jumptime.GetASSFormated());
|
JumpTime->SetValue(jumptime.GetASSFormated());
|
||||||
|
|
|
@ -71,7 +71,7 @@ wxTextCtrl(parent,id,value,pos,size,wxTE_CENTRE | style,validator,name)
|
||||||
SetValidator(val);
|
SetValidator(val);
|
||||||
|
|
||||||
// Other stuff
|
// Other stuff
|
||||||
SetValue(time.GetASSFormated());
|
if (!value) SetValue(time.GetASSFormated());
|
||||||
ready = true;
|
ready = true;
|
||||||
byFrame = false;
|
byFrame = false;
|
||||||
isEnd = false;
|
isEnd = false;
|
||||||
|
|
Loading…
Reference in a new issue