From 70cd27314bfdc9fa893051c65ab8526d3246f953 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 3 May 2018 11:58:13 +0200 Subject: [PATCH] Autocompletion for Spice model selector --- eeschema/dialogs/dialog_spice_model.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp index b5f72cce2d..a23818a987 100644 --- a/eeschema/dialogs/dialog_spice_model.cpp +++ b/eeschema/dialogs/dialog_spice_model.cpp @@ -652,11 +652,18 @@ void DIALOG_SPICE_MODEL::loadLibrary( const wxString& aFilePath ) } } + wxArrayString models; + // Refresh the model name combobox values m_modelName->Clear(); for( const auto& model : m_models ) + { m_modelName->Append( model.first ); + models.Add( model.first ); + } + + m_modelName->AutoComplete( models ); // Restore the previous value or if there is none - pick the first one from the loaded library if( !curModel.IsEmpty() )