Do not force focus on dataview in RC dialogs

On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925
This commit is contained in:
Jon Evans 2023-06-23 08:09:49 -04:00
parent 504e02192c
commit 7804c2177c
2 changed files with 4 additions and 0 deletions

View File

@ -451,7 +451,9 @@ void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event )
{
wxMilliSleep( 500 );
m_runningResultsBook->ChangeSelection( 1 );
#ifndef __WXGTK__
KIPLATFORM::UI::ForceFocus( m_markerDataView );
#endif
}
m_ercRun = true;

View File

@ -325,7 +325,9 @@ void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent )
{
wxMilliSleep( 500 );
m_runningResultsBook->ChangeSelection( 1 );
#ifndef __WXGTK__
KIPLATFORM::UI::ForceFocus( m_markerDataView );
#endif
}
refreshEditor();