Make sure OK button has focus when re-displaying ERC window.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16541
This commit is contained in:
Jeff Young 2024-01-07 17:20:34 +00:00
parent c5bb939cc9
commit 392242b9a4
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -25,6 +25,7 @@
#include <sch_symbol.h>
#include <id.h>
#include <kiway.h>
#include <kiplatform/ui.h>
#include <confirm.h>
#include <string_utils.h>
#include <gal/graphics_abstraction_layer.h>
@ -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 ) );
}