Minor cosmetic fixes to the goto frame/time dialog box. Patch by Harukalover.

Originally committed to SVN as r2720.
This commit is contained in:
Karl Blomster 2009-02-04 01:45:43 +00:00
parent ff7776233a
commit d9d0eddfde
2 changed files with 5 additions and 3 deletions

View file

@ -68,7 +68,7 @@ DialogJumpTo::DialogJumpTo (wxWindow *parent)
// Set initial values
ready = false;
jumpframe = VideoContext::Get()->GetFrameN();
jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe));
jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe,true,true));
// Times
wxStaticText *LabelFrame = new wxStaticText(this,-1,_("Frame: "),wxDefaultPosition,wxSize(60,20));
@ -147,6 +147,7 @@ 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));
@ -166,10 +167,11 @@ 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
int newtime = VFR_Output.GetTimeAtFrame(jumpframe);
int newtime = VFR_Output.GetTimeAtFrame(jumpframe,true,true);
if (jumptime.GetMS() != newtime) {
jumptime.SetMS(newtime);
JumpTime->SetValue(jumptime.GetASSFormated());

View file

@ -71,7 +71,7 @@ wxTextCtrl(parent,id,value,pos,size,wxTE_CENTRE | style,validator,name)
SetValidator(val);
// Other stuff
SetValue(time.GetASSFormated());
if (!value) SetValue(time.GetASSFormated());
ready = true;
byFrame = false;
isEnd = false;