1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 07:40:23 +02:00

Bug 2478 - Windows: with an empty rules list in "Extended Import" prefs - Tab or Home crashes Audacity

This commit is contained in:
Leland Lucius 2020-06-15 08:55:38 -05:00
parent cc1c395b33
commit e7e27aa7e9

View File

@ -588,6 +588,12 @@ void Grid::OnKeyDown(wxKeyEvent &event)
return;
}
else if (event.ShiftDown()) {
// Empty grid?
if (crow == -1 && ccol == -1) {
Navigate(wxNavigationKeyEvent::FromTab | wxNavigationKeyEvent::IsBackward);
return;
}
if (crow == 0 && ccol == 0) {
Navigate(wxNavigationKeyEvent::FromTab | wxNavigationKeyEvent::IsBackward);
return;
@ -600,6 +606,12 @@ void Grid::OnKeyDown(wxKeyEvent &event)
}
}
else {
// Empty grid?
if (crow == -1 && ccol == -1) {
Navigate(wxNavigationKeyEvent::FromTab | wxNavigationKeyEvent::IsForward);
return;
}
if (crow == rows - 1 && ccol == cols - 1) {
Navigate(wxNavigationKeyEvent::FromTab | wxNavigationKeyEvent::IsForward);
return;
@ -611,6 +623,7 @@ void Grid::OnKeyDown(wxKeyEvent &event)
SetGridCursor(crow, ccol + 1);
}
}
MakeCellVisible(GetGridCursorRow(), GetGridCursorCol());
#if wxUSE_ACCESSIBILITY