From 4020b5689b75959df6ac151c711f121a078fe587 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 11 Apr 2019 12:32:44 +0100 Subject: [PATCH] Refocus control after doing our little raise/raise dance. Fixes: lp:1821451 * https://bugs.launchpad.net/kicad/+bug/1821451 --- cvpcb/cvpcb_mainframe.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index e57a355417..19b4806007 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -811,8 +811,12 @@ void CVPCB_MAINFRAME::CreateScreenCmp() // So we want to put it to front, second after our CVPCB_MAINFRAME. // We do this by a little dance of bringing it to front then the main // frame back. + wxWindow* focus = FindFocus(); + fpframe->Raise(); // Make sure that is visible. Raise(); // .. but still we want the focus. + + focus->SetFocus(); } fpframe->InitDisplay();