From 4c5e1f30fd27d1e67541bf0a0a7973ccdf17a677 Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 5 Mar 2018 15:13:42 +0000 Subject: [PATCH] Keep focus on Expand/Shrink button when resizing Macro Dialog. --- src/BatchProcessDialog.cpp | 5 +++-- src/BatchProcessDialog.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp index 3f4d1d564..6977ec1ee 100644 --- a/src/BatchProcessDialog.cpp +++ b/src/BatchProcessDialog.cpp @@ -120,7 +120,7 @@ void ApplyMacroDialog::PopulateOrExchange(ShuttleGui &S) S.StartHorizontalLay(wxALIGN_RIGHT, false); { - S.Id(ExpandID).AddButton(_("&Expand")); + mResize = S.Id(ExpandID).AddButton(_("&Expand")); } S.EndHorizontalLay(); @@ -589,7 +589,7 @@ void MacrosWindow::PopulateOrExchange(ShuttleGui & S) { S.Prop(0).StartHorizontalLay(wxALIGN_RIGHT, false); { - S.Id(ShrinkID).AddButton(_("Shrin&k")); + mResize = S.Id(ShrinkID).AddButton(_("Shrin&k")); } S.EndHorizontalLay(); S.StartStatic(_("&Select Macro"),1); @@ -740,6 +740,7 @@ void MacrosWindow::UpdateDisplay( bool bExpanded ) else ApplyMacroDialog::Populate(); SetPosition( p ); + mResize->SetFocus(); wxString Title = mbExpanded ? _("Edit Macros") : _("Apply Macro"); SetLabel( Title ); // Provide visual label diff --git a/src/BatchProcessDialog.h b/src/BatchProcessDialog.h index 29e4af050..1470957e0 100644 --- a/src/BatchProcessDialog.h +++ b/src/BatchProcessDialog.h @@ -66,6 +66,7 @@ class ApplyMacroDialog : public wxDialogWrapper { wxListCtrl *mMacros; MacroCommands mMacroCommands; /// Provides list of available commands. + wxButton *mResize; wxButton *mOK; wxButton *mCancel; wxTextCtrl *mResults;