diff --git a/eeschema/dialogs/dialog_schematic_find.cpp b/eeschema/dialogs/dialog_schematic_find.cpp index b0a819f787..37e57443ea 100644 --- a/eeschema/dialogs/dialog_schematic_find.cpp +++ b/eeschema/dialogs/dialog_schematic_find.cpp @@ -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 );