Fixed the default value generated for Spice_Node_Sequence field

Values generated by NETLIST_EXPORTER_PSPICE::GetSpiceFieldDefVal()
and the actual value that was stored in a netlist differed when a
component has multiple units.

Due to that, the Spice model editor dialog incorrectly recognized
"alternate node sequence" value as the default one and cleared it
when the dialog was closed.
This commit is contained in:
Maciej Suminski 2018-05-03 11:29:34 +02:00
parent bf135b0690
commit 72a70d61d8
1 changed files with 3 additions and 1 deletions

View File

@ -233,7 +233,9 @@ wxString NETLIST_EXPORTER_PSPICE::GetSpiceFieldDefVal( SPICE_FIELD aField,
wxString nodeSeq; wxString nodeSeq;
std::vector<LIB_PIN*> pins; std::vector<LIB_PIN*> pins;
aComponent->GetPins( pins ); auto part = aComponent->GetPartRef().lock();
wxCHECK( part, wxString() );
part->GetPins( pins );
for( auto pin : pins ) for( auto pin : pins )
nodeSeq += pin->GetNumber() + " "; nodeSeq += pin->GetNumber() + " ";