Assign focus to the notebook in the ERC/DRC window after running
After running the ERC/DRC, the window would not get focus returned to it on GTK naturally unless the user pressed the arrow key. This prevented the ESC key from closing the window after the run was complete and nothing else was clicked/pressed. Instead of pulling focus to the dataview with the errors in it (which would cause problems in GTK, such as moving the viewport to the first marker (https://gitlab.com/kicad/code/kicad/-/issues/11925), give focus to the notebook container instead. This will not select the marker, but still allow the ESC to propagate into the dialog immediately.
This commit is contained in:
parent
111d73067d
commit
1dd92b1bb1
|
@ -451,9 +451,7 @@ void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event )
|
|||
{
|
||||
wxMilliSleep( 500 );
|
||||
m_runningResultsBook->ChangeSelection( 1 );
|
||||
#ifndef __WXGTK__
|
||||
KIPLATFORM::UI::ForceFocus( m_markerDataView );
|
||||
#endif
|
||||
KIPLATFORM::UI::ForceFocus( m_notebook );
|
||||
}
|
||||
|
||||
m_ercRun = true;
|
||||
|
|
|
@ -325,9 +325,7 @@ void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent )
|
|||
{
|
||||
wxMilliSleep( 500 );
|
||||
m_runningResultsBook->ChangeSelection( 1 );
|
||||
#ifndef __WXGTK__
|
||||
KIPLATFORM::UI::ForceFocus( m_markerDataView );
|
||||
#endif
|
||||
KIPLATFORM::UI::ForceFocus( m_Notebook );
|
||||
}
|
||||
|
||||
refreshEditor();
|
||||
|
|
Loading…
Reference in New Issue