Separate legacy model name from parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13988
This commit is contained in:
parent
79fbde0894
commit
39a801423e
|
@ -1586,6 +1586,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( ' ', ¶ms );
|
||||
|
||||
if( !params.Trim( false ).IsEmpty() )
|
||||
{
|
||||
spiceParamsInfo = spiceModelInfo;
|
||||
spiceParamsInfo.m_Text = params.Trim( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue