mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 15:23:48 +01:00
Bug682: fix Tab key navigation in Preferences, particulary Keyboard
This commit is contained in:
@@ -73,6 +73,9 @@ BEGIN_EVENT_TABLE(PrefsDialog, wxDialog)
|
||||
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
|
||||
EVT_BUTTON(wxID_APPLY, PrefsDialog::OnApply)
|
||||
EVT_TREE_KEY_DOWN(wxID_ANY, PrefsDialog::OnTreeKeyDown) // Handles key events when tree has focus
|
||||
|
||||
EVT_CHAR_HOOK(PrefsDialog::OnCharHook)
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
@@ -373,6 +376,12 @@ void PrefsDialog::OnTreeKeyDown(wxTreeEvent & event)
|
||||
event.Skip(); // Ensure standard behavior when enter is not pressed
|
||||
}
|
||||
|
||||
void PrefsDialog::OnCharHook(wxKeyEvent &event)
|
||||
{
|
||||
// Common behavior, let's define it in just one place
|
||||
wxPanelWrapper::DoCharHook(event);
|
||||
}
|
||||
|
||||
void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
RecordExpansionState();
|
||||
|
||||
@@ -61,6 +61,8 @@ class PrefsDialog /* not final */ : public wxDialog
|
||||
void OnApply(wxCommandEvent & e);
|
||||
void OnTreeKeyDown(wxTreeEvent & e); // Used to dismiss the dialog when enter is pressed with focus on tree
|
||||
|
||||
void OnCharHook(wxKeyEvent &e);
|
||||
|
||||
void SelectPageByName(const wxString &pageName);
|
||||
|
||||
// Accessor to help implementations of SavePreferredPage(),
|
||||
|
||||
Reference in New Issue
Block a user