Applied pomyk's dialog_export and duplicate patches

Originally committed to SVN as r199.
This commit is contained in:
Rodrigo Braz Monteiro 2006-03-05 02:47:20 +00:00
parent 3a3f3bb463
commit d11298c85e
2 changed files with 4 additions and 4 deletions

View File

@ -232,7 +232,7 @@ void DialogExport::OnChange(wxCommandEvent &event) {
// Move up // Move up
void DialogExport::OnMoveUp(wxCommandEvent &event) { void DialogExport::OnMoveUp(wxCommandEvent &event) {
int pos = FilterList->GetSelection(); int pos = FilterList->GetSelection();
if (pos == 0) return; if (pos <= 0) return;
FilterList->Freeze(); FilterList->Freeze();
wxString tempname = FilterList->GetString(pos); wxString tempname = FilterList->GetString(pos);
bool tempval = FilterList->IsChecked(pos); bool tempval = FilterList->IsChecked(pos);
@ -250,7 +250,7 @@ void DialogExport::OnMoveUp(wxCommandEvent &event) {
void DialogExport::OnMoveDown(wxCommandEvent &event) { void DialogExport::OnMoveDown(wxCommandEvent &event) {
int pos = FilterList->GetSelection(); int pos = FilterList->GetSelection();
int n = FilterList->GetCount(); int n = FilterList->GetCount();
if (pos == n-1) return; if (pos == n-1 || pos == -1) return;
FilterList->Freeze(); FilterList->Freeze();
wxString tempname = FilterList->GetString(pos); wxString tempname = FilterList->GetString(pos);
bool tempval = FilterList->IsChecked(pos); bool tempval = FilterList->IsChecked(pos);

View File

@ -959,8 +959,8 @@ void SubtitlesGrid::DuplicateLines(int n1,int n2,bool nextFrame) {
// Shift to next frame // Shift to next frame
if (nextFrame) { if (nextFrame) {
int posFrame = VFR_Output.GetFrameAtTime(cur->End.GetMS(),false) + 1; int posFrame = VFR_Output.GetFrameAtTime(cur->End.GetMS(),false) + 1;
cur->Start.SetMS(VFR_Output.GetFrameAtTime(posFrame,true)); cur->Start.SetMS(VFR_Output.GetTimeAtFrame(posFrame,true));
cur->End.SetMS(VFR_Output.GetFrameAtTime(posFrame,false)); cur->End.SetMS(VFR_Output.GetTimeAtFrame(posFrame,false));
cur->UpdateData(); cur->UpdateData();
} }