Autocompletion for Spice model selector

This commit is contained in:
Maciej Suminski 2018-05-03 11:58:13 +02:00
parent 72a70d61d8
commit 70cd27314b
1 changed files with 7 additions and 0 deletions

View File

@ -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() )