Use default for attribute "display" if not found.
Fixes: lp:1767447 * https://bugs.launchpad.net/kicad/+bug/1767447
This commit is contained in:
parent
09622a4c9f
commit
62d6750ced
|
@ -518,12 +518,12 @@ EATTR::EATTR( wxXmlNode* aTree )
|
|||
// (off | value | name | both)
|
||||
if( stemp == "off" )
|
||||
display = EATTR::Off;
|
||||
else if( stemp == "value" )
|
||||
display = EATTR::VALUE;
|
||||
else if( stemp == "name" )
|
||||
display = EATTR::NAME;
|
||||
else if( stemp == "both" )
|
||||
display = EATTR::BOTH;
|
||||
else // "value" is the default
|
||||
display = EATTR::VALUE;
|
||||
|
||||
stemp = parseOptionalAttribute<wxString>( aTree, "align" );
|
||||
|
||||
|
|
|
@ -1152,9 +1152,9 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
|
||||
SCH_FIELD* field;
|
||||
|
||||
if( attr.name == "name" || attr.name == "value" )
|
||||
if( attr.name.Lower() == "name" || attr.name.Lower() == "value" )
|
||||
{
|
||||
if( attr.name == "name" )
|
||||
if( attr.name.Lower() == "name" )
|
||||
{
|
||||
field = component->GetField( REFERENCE );
|
||||
nameAttributeFound = true;
|
||||
|
@ -1175,7 +1175,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
|
||||
bool spin = attr.rot ? attr.rot->spin : false;
|
||||
|
||||
if( attr.display == EATTR::Off )
|
||||
if( attr.display == EATTR::Off || attr.display == EATTR::NAME )
|
||||
field->SetVisible( false );
|
||||
|
||||
int rotation = einstance.rot ? einstance.rot->degrees : 0;
|
||||
|
|
Loading…
Reference in New Issue