Eeschema: fix new symbol library file format parser bug.
LIB_FIELD objects require a LIB_PART as a parent. Add missing parent on symbol library load. Fixes https://gitlab.com/kicad/code/kicad/issues/4360
This commit is contained in:
parent
302646cb3c
commit
62d72ae081
|
@ -303,7 +303,9 @@ wxString LIB_FIELD::GetFullText( int unit ) const
|
|||
wxString text = GetText();
|
||||
text << wxT( "?" );
|
||||
|
||||
if( GetParent() && GetParent()->IsMulti() )
|
||||
wxCHECK( GetParent(), text );
|
||||
|
||||
if( GetParent()->IsMulti() )
|
||||
text << LIB_PART::SubReference( unit );
|
||||
|
||||
return text;
|
||||
|
|
|
@ -690,11 +690,12 @@ void SCH_SEXPR_PARSER::parseProperty( std::unique_ptr<LIB_PART>& aSymbol )
|
|||
wxCHECK_RET( CurTok() == T_property,
|
||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) +
|
||||
wxT( " as a property token." ) );
|
||||
wxCHECK( aSymbol, /* void */ );
|
||||
|
||||
wxString error;
|
||||
wxString name;
|
||||
wxString value;
|
||||
std::unique_ptr<LIB_FIELD> field( new LIB_FIELD( MANDATORY_FIELDS ) );
|
||||
std::unique_ptr<LIB_FIELD> field( new LIB_FIELD( aSymbol.get(), MANDATORY_FIELDS ) );
|
||||
|
||||
T token = NextTok();
|
||||
|
||||
|
|
Loading…
Reference in New Issue