eeschema: fix of not updating spice primitive field

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8835
This commit is contained in:
Sylwester Kocjan 2021-08-26 23:49:49 +02:00 committed by jean-pierre charras
parent 317fae2098
commit ddba9e2351
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ bool DIALOG_SPICE_MODEL::TransferDataFromWindow()
int modelIdx = m_modelType->GetSelection(); int modelIdx = m_modelType->GetSelection();
if( modelIdx > 0 && modelIdx < (int)modelTypes.size() ) if( modelIdx >= 0 && modelIdx < (int) modelTypes.size() )
m_fieldsTmp[SF_PRIMITIVE] = static_cast<char>( modelTypes[modelIdx].type ); m_fieldsTmp[SF_PRIMITIVE] = static_cast<char>( modelTypes[modelIdx].type );
m_fieldsTmp[SF_MODEL] = m_modelName->GetValue(); m_fieldsTmp[SF_MODEL] = m_modelName->GetValue();