mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-12 23:55:50 +01:00
MousePrefs: fix a focus issue
Problem: a user can tab to the list, and no list item is the focus, and there is no visual indication of focus. Fix: set the first item to be selected and focused
This commit is contained in:
@@ -83,6 +83,12 @@ void MousePrefs::Populate()
|
|||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
// ----------------------- End of main section --------------
|
// ----------------------- End of main section --------------
|
||||||
CreateList();
|
CreateList();
|
||||||
|
if (mList->GetItemCount() > 0) {
|
||||||
|
// set first item to be selected (and the focus when the
|
||||||
|
// list first becomes the focus)
|
||||||
|
mList->SetItemState(0, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
|
||||||
|
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Places controls on the panel and also exchanges data with them.
|
/// Places controls on the panel and also exchanges data with them.
|
||||||
|
|||||||
Reference in New Issue
Block a user