mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-03 22:19:07 +02: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:
parent
62f1711cdd
commit
fc14d031e4
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user