From c1c19774b436acc8a684f42f097cc31a37101e2b Mon Sep 17 00:00:00 2001 From: David Bailes Date: Wed, 19 Jul 2017 14:10:34 +0100 Subject: [PATCH] When a VST effect is opened, the dialog is not the focus. Problem caused by commit: 79c3bef SetFocus() is being called when !success. Fix: Move the call to SetFocus back to its original place in the code. --- src/Menus.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index 869f2cd00..bda06ff5f 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -4218,10 +4218,6 @@ bool AudacityProject::OnEffect(const PluginID & ID, int flags) UpdateMenus(false); } - if (focus != NULL) { - focus->SetFocus(); - } - } ); //double prevEndTime = mTracks->GetEndTime(); @@ -4290,6 +4286,9 @@ bool AudacityProject::OnEffect(const PluginID & ID, int flags) // mTrackPanel->Refresh(false); } RedrawProject(); + if (focus != nullptr) { + focus->SetFocus(); + } mTrackPanel->EnsureVisible(mTrackPanel->GetFirstSelectedTrack()); mTrackPanel->Refresh(false);