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(); }