From cc339e56a20f3cb2c901885ae074f2c77a1d8a75 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 18 Nov 2021 13:44:23 +0100 Subject: [PATCH] Kicad manager: fix a minor cosmetic issue when clicking on a launcher button. - On GTK the next button was gaining the focus. - On MSW the button disappears a bit of time. Fixes #9676 https://gitlab.com/kicad/code/kicad/issues/9676 --- kicad/dialogs/panel_kicad_launcher.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kicad/dialogs/panel_kicad_launcher.cpp b/kicad/dialogs/panel_kicad_launcher.cpp index 848b6e6e26..dacd5bfb92 100644 --- a/kicad/dialogs/panel_kicad_launcher.cpp +++ b/kicad/dialogs/panel_kicad_launcher.cpp @@ -67,9 +67,12 @@ void PANEL_KICAD_LAUNCHER::CreateLaunchers() auto handler = [&]( wxEvent& aEvent ) { - // Defocus the button because leaving the large buttons + // Defocus the button because leaving the large buttons // focused after a click looks out of place in the launcher GetParent()->SetFocus(); + // Gives a slice of time to update the button state (mandatory on GTK, + // useful on MSW to avoid some cosmetic issues). + wxSafeYield(); OPT_TOOL_EVENT evt = aAction.MakeEvent(); evt->SetHasPosition( false );