Switch button focus to Close after running ERC or DRC.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16541
This commit is contained in:
Jeff Young 2024-01-10 17:23:29 +00:00
parent 6c9e716573
commit 9038f80543
3 changed files with 9 additions and 1 deletions

View File

@ -451,6 +451,10 @@ void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event )
if( !m_cancelled )
{
m_sdbSizer1Cancel->SetDefault();
// wxWidgets has a tendency to keep both buttons highlighted without the following:
m_sdbSizer1OK->Enable( false );
wxMilliSleep( 500 );
m_runningResultsBook->ChangeSelection( 1 );
KIPLATFORM::UI::ForceFocus( m_notebook );

View File

@ -337,6 +337,10 @@ void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent )
if( !m_cancelled )
{
m_sdbSizerCancel->SetDefault();
// wxWidgets has a tendency to keep both buttons highlighted without the following:
m_sdbSizerOK->Enable( false );
wxMilliSleep( 500 );
m_runningResultsBook->ChangeSelection( 1 );
KIPLATFORM::UI::ForceFocus( m_Notebook );

View File

@ -147,6 +147,6 @@ void DIALOG_UPDATE_PCB::OnUpdateClick( wxCommandEvent& event )
PerformUpdate( false );
m_sdbSizer1Cancel->SetDefault();
// Widgets has a tendency to keep both buttons highlighted without the following:
// wxWidgets has a tendency to keep both buttons highlighted without the following:
m_sdbSizer1OK->Enable( false );
}