Separate legacy model name from parameters.

Fixes https://gitlab.com/kicad/code/kicad/issues/13988

(cherry picked from commit 39a801423e)
This commit is contained in:
Jeff Young 2023-03-21 13:28:02 +00:00
parent ba7598d90d
commit 1614dc975a
1 changed files with 13 additions and 0 deletions

View File

@ -1591,6 +1591,19 @@ void SIM_MODEL::MigrateSimModel( T_symbol& aSymbol, const PROJECT* aProject )
{
spiceModelInfo = FIELD_INFO( getSIValue( modelField ), modelField );
aSymbol.RemoveField( modelField );
if( spiceModelInfo.m_Text.Contains( ' ' ) )
{
wxString params;
spiceModelInfo.m_Text = spiceModelInfo.m_Text.BeforeFirst( ' ', &params );
if( !params.Trim( false ).IsEmpty() )
{
spiceParamsInfo = spiceModelInfo;
spiceParamsInfo.m_Text = params.Trim( false );
}
}
}
else
{