1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Keep focus on Expand/Shrink button when resizing Macro Dialog.

This commit is contained in:
James Crook 2018-03-05 15:13:42 +00:00
parent 6b44a53de9
commit 4c5e1f30fd
2 changed files with 4 additions and 2 deletions

View File

@ -120,7 +120,7 @@ void ApplyMacroDialog::PopulateOrExchange(ShuttleGui &S)
S.StartHorizontalLay(wxALIGN_RIGHT, false); S.StartHorizontalLay(wxALIGN_RIGHT, false);
{ {
S.Id(ExpandID).AddButton(_("&Expand")); mResize = S.Id(ExpandID).AddButton(_("&Expand"));
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
@ -589,7 +589,7 @@ void MacrosWindow::PopulateOrExchange(ShuttleGui & S)
{ {
S.Prop(0).StartHorizontalLay(wxALIGN_RIGHT, false); S.Prop(0).StartHorizontalLay(wxALIGN_RIGHT, false);
{ {
S.Id(ShrinkID).AddButton(_("Shrin&k")); mResize = S.Id(ShrinkID).AddButton(_("Shrin&k"));
} }
S.EndHorizontalLay(); S.EndHorizontalLay();
S.StartStatic(_("&Select Macro"),1); S.StartStatic(_("&Select Macro"),1);
@ -740,6 +740,7 @@ void MacrosWindow::UpdateDisplay( bool bExpanded )
else else
ApplyMacroDialog::Populate(); ApplyMacroDialog::Populate();
SetPosition( p ); SetPosition( p );
mResize->SetFocus();
wxString Title = mbExpanded ? _("Edit Macros") : _("Apply Macro"); wxString Title = mbExpanded ? _("Edit Macros") : _("Apply Macro");
SetLabel( Title ); // Provide visual label SetLabel( Title ); // Provide visual label

View File

@ -66,6 +66,7 @@ class ApplyMacroDialog : public wxDialogWrapper {
wxListCtrl *mMacros; wxListCtrl *mMacros;
MacroCommands mMacroCommands; /// Provides list of available commands. MacroCommands mMacroCommands; /// Provides list of available commands.
wxButton *mResize;
wxButton *mOK; wxButton *mOK;
wxButton *mCancel; wxButton *mCancel;
wxTextCtrl *mResults; wxTextCtrl *mResults;