From 18646a26683d7c59aacafc9a2665cee9ed2d4487 Mon Sep 17 00:00:00 2001 From: David Bailes Date: Tue, 14 Aug 2018 13:17:39 +0100 Subject: [PATCH] Select Command dialog: minor focus fix Problem: when the list first becomes focus, no item in the list is the focus. --- src/BatchCommandDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/BatchCommandDialog.cpp b/src/BatchCommandDialog.cpp index 901b2245b..3818ddd24 100644 --- a/src/BatchCommandDialog.cpp +++ b/src/BatchCommandDialog.cpp @@ -118,6 +118,12 @@ void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S) S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton); 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)); Fit();