From 392242b9a48001047ce49f0f1d5b9748e0961260 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 7 Jan 2024 17:20:34 +0000 Subject: [PATCH] Make sure OK button has focus when re-displaying ERC window. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16541 --- eeschema/dialogs/dialog_erc.cpp | 1 + eeschema/tools/ee_inspection_tool.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 33a04b0b5b..155e553d1c 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -397,6 +397,7 @@ void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event ) m_ignoredList->SetColumnWidth( 0, m_ignoredList->GetParent()->GetClientSize().x - 20 ); + m_cancelled = false; Raise(); m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index 96925c8f12..804ba7bdd7 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,8 @@ void EE_INSPECTION_TOOL::ShowERCDialog() // Bring it to the top if already open. Dual monitor users need this. dlg->Raise(); + + KIPLATFORM::UI::ForceFocus( dlg->FindWindow( wxID_OK ) ); }