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


(cherry picked from commit 7804c2177c)
This commit is contained in:
Jon Evans 2023-06-23 08:09:49 -04:00
parent 80462cf559
commit 228fe71eb4
2 changed files with 4 additions and 0 deletions

View File

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

View File

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