From 39a801423ebef732452a1386a8da3ff0fb3f76fa Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 21 Mar 2023 13:28:02 +0000 Subject: [PATCH] Separate legacy model name from parameters. Fixes https://gitlab.com/kicad/code/kicad/issues/13988 --- eeschema/sim/sim_model.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/eeschema/sim/sim_model.cpp b/eeschema/sim/sim_model.cpp index f32d6fa8ea..5ad1d2a349 100644 --- a/eeschema/sim/sim_model.cpp +++ b/eeschema/sim/sim_model.cpp @@ -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 {