Limit Eeschema find/replace entries

Standardize maximum find/replace entries to 10

Fixes https://gitlab.com/kicad/code/kicad/issues/9007
This commit is contained in:
Seth Hillbrand 2021-08-20 11:47:27 -07:00
parent 75e4fa9b75
commit bee3d78d78
1 changed files with 12 additions and 0 deletions

View File

@ -296,6 +296,12 @@ void DIALOG_SCH_FIND::SetFindEntries( const wxArrayString& aEntries )
{
m_comboFind->Append( aEntries );
while( m_comboFind->GetCount() > 10 )
{
m_frame->GetFindHistoryList().pop_back();
m_comboFind->Delete( 9 );
}
if( m_comboFind->GetCount() )
{
m_comboFind->SetSelection( 0 );
@ -308,6 +314,12 @@ void DIALOG_SCH_FIND::SetReplaceEntries( const wxArrayString& aEntries )
{
m_comboReplace->Append( aEntries );
while( m_comboReplace->GetCount() > 10 )
{
m_frame->GetFindHistoryList().pop_back();
m_comboReplace->Delete( 9 );
}
if( m_comboReplace->GetCount() )
{
m_comboReplace->SetSelection( 0 );