1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 06:09:47 +02:00

Select Command dialog: minor focus fix

Problem: when the list first becomes focus, no item in the list is the focus.
This commit is contained in:
David Bailes 2018-08-14 13:17:39 +01:00
parent b2feab61a9
commit 18646a2668

View File

@ -118,6 +118,12 @@ void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S)
S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton); S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton);
PopulateCommandList(); PopulateCommandList();
if (mChoices->GetItemCount() > 0) {
// set first item to be selected (and the focus when the
// list first becomes the focus)
mChoices->SetItemState(0, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
}
SetMinSize(wxSize(780, 560)); SetMinSize(wxSize(780, 560));
Fit(); Fit();