From d11298c85ef6cede4071d2c3fbd66d555a9b1f9c Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 5 Mar 2006 02:47:20 +0000 Subject: [PATCH] Applied pomyk's dialog_export and duplicate patches Originally committed to SVN as r199. --- core/dialog_export.cpp | 4 ++-- core/subs_grid.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/dialog_export.cpp b/core/dialog_export.cpp index 03412cd14..78e90d656 100644 --- a/core/dialog_export.cpp +++ b/core/dialog_export.cpp @@ -232,7 +232,7 @@ void DialogExport::OnChange(wxCommandEvent &event) { // Move up void DialogExport::OnMoveUp(wxCommandEvent &event) { int pos = FilterList->GetSelection(); - if (pos == 0) return; + if (pos <= 0) return; FilterList->Freeze(); wxString tempname = FilterList->GetString(pos); bool tempval = FilterList->IsChecked(pos); @@ -250,7 +250,7 @@ void DialogExport::OnMoveUp(wxCommandEvent &event) { void DialogExport::OnMoveDown(wxCommandEvent &event) { int pos = FilterList->GetSelection(); int n = FilterList->GetCount(); - if (pos == n-1) return; + if (pos == n-1 || pos == -1) return; FilterList->Freeze(); wxString tempname = FilterList->GetString(pos); bool tempval = FilterList->IsChecked(pos); diff --git a/core/subs_grid.cpp b/core/subs_grid.cpp index e86ad9de3..6afa3452e 100644 --- a/core/subs_grid.cpp +++ b/core/subs_grid.cpp @@ -959,8 +959,8 @@ void SubtitlesGrid::DuplicateLines(int n1,int n2,bool nextFrame) { // Shift to next frame if (nextFrame) { int posFrame = VFR_Output.GetFrameAtTime(cur->End.GetMS(),false) + 1; - cur->Start.SetMS(VFR_Output.GetFrameAtTime(posFrame,true)); - cur->End.SetMS(VFR_Output.GetFrameAtTime(posFrame,false)); + cur->Start.SetMS(VFR_Output.GetTimeAtFrame(posFrame,true)); + cur->End.SetMS(VFR_Output.GetTimeAtFrame(posFrame,false)); cur->UpdateData(); }