PCB Parsing: only parse old properties before PCB fields addition
This commit is contained in:
parent
e0bdd956ac
commit
6c1273ca12
|
@ -4051,43 +4051,48 @@ FOOTPRINT* PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked( wxArrayString* a
|
||||||
NeedSYMBOL();
|
NeedSYMBOL();
|
||||||
wxString pValue = FromUTF8();
|
wxString pValue = FromUTF8();
|
||||||
|
|
||||||
// Skip legacy non-field properties sent from symbols that should not be kept
|
// Prior to PCB fields, we used to use properties for special values instead of
|
||||||
// in footprints.
|
// using (keyword_example "value")
|
||||||
if( pName == "ki_keywords" || pName == "ki_locked" )
|
if( m_requiredVersion < 20230620 )
|
||||||
{
|
{
|
||||||
NeedRIGHT();
|
// Skip legacy non-field properties sent from symbols that should not be kept
|
||||||
break;
|
// in footprints.
|
||||||
}
|
if( pName == "ki_keywords" || pName == "ki_locked" )
|
||||||
|
{
|
||||||
|
NeedRIGHT();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Description from symbol (not the fooprint library description stored in (descr) )
|
// Description from symbol (not the fooprint library description stored in (descr) )
|
||||||
// used to be stored as a reserved key value
|
// used to be stored as a reserved key value
|
||||||
if( pName == "ki_description" )
|
if( pName == "ki_description" )
|
||||||
{
|
{
|
||||||
footprint->GetFieldById( DESCRIPTION_FIELD )->SetText( pValue );
|
footprint->GetFieldById( DESCRIPTION_FIELD )->SetText( pValue );
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pName == "ki_fp_filters" )
|
if( pName == "ki_fp_filters" )
|
||||||
{
|
{
|
||||||
footprint->SetFilters( pValue );
|
footprint->SetFilters( pValue );
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sheet file and name used to be stored as properties invisible to the user
|
// Sheet file and name used to be stored as properties invisible to the user
|
||||||
if( pName == "Sheetfile" || pName == "Sheet file" )
|
if( pName == "Sheetfile" || pName == "Sheet file" )
|
||||||
{
|
{
|
||||||
footprint->SetSheetfile( pValue );
|
footprint->SetSheetfile( pValue );
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pName == "Sheetname" || pName == "Sheet name" )
|
if( pName == "Sheetname" || pName == "Sheet name" )
|
||||||
{
|
{
|
||||||
footprint->SetSheetname( pValue );
|
footprint->SetSheetname( pValue );
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PCB_FIELD* field = nullptr;
|
PCB_FIELD* field = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue