Eeschema Eagle Import: Set visibility of fields based on attribute display value.
This commit is contained in:
parent
00d1368099
commit
cdb5a01091
|
@ -1131,6 +1131,12 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
||||||
}
|
}
|
||||||
bool spin = attr.rot ? attr.rot->spin : false;
|
bool spin = attr.rot ? attr.rot->spin : false;
|
||||||
|
|
||||||
|
if(attr.display == EATTR::Off)
|
||||||
|
{
|
||||||
|
field->SetVisible( false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int rotation = einstance.rot ? einstance.rot->degrees : 0;
|
int rotation = einstance.rot ? einstance.rot->degrees : 0;
|
||||||
int reldegrees = ( absdegrees - rotation + 360.0);
|
int reldegrees = ( absdegrees - rotation + 360.0);
|
||||||
reldegrees %= 360;
|
reldegrees %= 360;
|
||||||
|
@ -1152,6 +1158,12 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
||||||
mirror = !mirror;
|
mirror = !mirror;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(attr.display == EATTR::Off)
|
||||||
|
{
|
||||||
|
field->SetVisible( false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int rotation = einstance.rot ? einstance.rot->degrees : 0;
|
int rotation = einstance.rot ? einstance.rot->degrees : 0;
|
||||||
int reldegrees = ( absdegrees - rotation + 360.0);
|
int reldegrees = ( absdegrees - rotation + 360.0);
|
||||||
reldegrees %= 360;
|
reldegrees %= 360;
|
||||||
|
@ -1163,8 +1175,8 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
||||||
|
|
||||||
}
|
}
|
||||||
if (smashed ){
|
if (smashed ){
|
||||||
component->GetField( VALUE )->SetVisible( valueAttributeFound );
|
if(!valueAttributeFound) component->GetField( VALUE )->SetVisible( false );
|
||||||
component->GetField( REFERENCE )->SetVisible( nameAttributeFound );
|
if(!nameAttributeFound) component->GetField( REFERENCE )->SetVisible( false );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue