diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index 329fd304d6..d1727eccfd 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -112,7 +112,11 @@ 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 ) ); + if( wxButton* okButton = dynamic_cast( dlg->FindWindow( wxID_OK ) ) ) + { + KIPLATFORM::UI::ForceFocus( okButton ); + okButton->SetDefault(); + } }