Restore fix for #10029.

Fixes https://gitlab.com/kicad/code/kicad/issues/12445

(cherry picked from commit 1be8adebf5)
This commit is contained in:
Jeff Young 2022-09-17 15:56:15 +01:00
parent 6d25e57cd7
commit 8b690c9a3c
1 changed files with 7 additions and 0 deletions

View File

@ -421,6 +421,10 @@ void CVPCB_MAINFRAME::OnEnterFilteringText( wxCommandEvent& aEvent )
// If the option FOOTPRINTS_LISTBOX::FILTERING_BY_TEXT_PATTERN is set, update the list
// of available footprints which match the filter
// GTK loses the search-control's focus when updating the footprints list box, so we record
// the insertion point here and then restore it (and the focus) at the end.
long pos = m_tcFilterString->GetInsertionPoint();
COMPONENT* symbol = GetSelectedComponent();
wxString libraryName = m_librariesListBox->GetSelectedLibrary();
@ -435,6 +439,9 @@ void CVPCB_MAINFRAME::OnEnterFilteringText( wxCommandEvent& aEvent )
RefreshFootprintViewer();
DisplayStatus();
m_tcFilterString->SetFocus();
m_tcFilterString->SetInsertionPoint( pos );
}