Fix Eagle schematic arc orientation and field visibility issues.
This does not fix all field visibility and position issues. This is due to LIB_SYMBOL objects not supporting per unit field properties. The current Eagle importer sets multiple unit symbol field properties to the last unit parsed in the Eagle schematic file. The upcoming two pass importer will resolve this issue.
This commit is contained in:
parent
798db3b5c7
commit
c3360d8c43
|
@ -1836,9 +1836,7 @@ void SCH_IO_EAGLE::loadInstance( wxXmlNode* aInstanceNode )
|
|||
SCH_FIELD* valueField = symbol->GetField( VALUE_FIELD );
|
||||
bool userValue = m_userValue.at( libIdSymbolName );
|
||||
|
||||
valueField->SetVisible( part->GetFieldById( VALUE_FIELD )->IsVisible() );
|
||||
|
||||
if( !userValue && epart->value )
|
||||
if( epart->value )
|
||||
{
|
||||
valueField->SetText( *epart->value );
|
||||
}
|
||||
|
@ -2048,6 +2046,8 @@ EAGLE_LIBRARY* SCH_IO_EAGLE::loadLibrary( wxXmlNode* aLibraryNode, EAGLE_LIBRARY
|
|||
reference->SetText( edevice.package ? prefix : '#' + prefix );
|
||||
}
|
||||
|
||||
libSymbol->GetFieldById( VALUE_FIELD )->SetVisible( true );
|
||||
|
||||
int gateindex = 1;
|
||||
bool ispower = false;
|
||||
|
||||
|
@ -2272,11 +2272,8 @@ bool SCH_IO_EAGLE::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_SYMBO
|
|||
currentNode = currentNode->GetNext();
|
||||
}
|
||||
|
||||
if( !showRefDes )
|
||||
aSymbol->GetFieldById( REFERENCE_FIELD )->SetVisible( false );
|
||||
|
||||
if( !showValue )
|
||||
aSymbol->GetFieldById( VALUE_FIELD )->SetVisible( false );
|
||||
aSymbol->GetFieldById( REFERENCE_FIELD )->SetVisible( showRefDes );
|
||||
aSymbol->GetFieldById( VALUE_FIELD )->SetVisible( showValue );
|
||||
|
||||
return pincount == 1 ? ispower : false;
|
||||
}
|
||||
|
@ -2346,7 +2343,7 @@ SCH_ITEM* SCH_IO_EAGLE::loadSymbolWire( wxXmlNode* aWireNode, int aGateNumber )
|
|||
if( ewire.curve )
|
||||
{
|
||||
SCH_SHAPE* arc = new SCH_SHAPE( SHAPE_T::ARC, LAYER_DEVICE );
|
||||
VECTOR2I center = ConvertArcCenter( begin, end, *ewire.curve * -1 );
|
||||
VECTOR2I center = ConvertArcCenter( begin, end, *ewire.curve * - 1 );
|
||||
double radius = sqrt( ( ( center.x - begin.x ) * ( center.x - begin.x ) ) +
|
||||
( ( center.y - begin.y ) * ( center.y - begin.y ) ) );
|
||||
|
||||
|
@ -2366,7 +2363,7 @@ SCH_ITEM* SCH_IO_EAGLE::loadSymbolWire( wxXmlNode* aWireNode, int aGateNumber )
|
|||
|
||||
arc->SetCenter( center );
|
||||
arc->SetStart( begin );
|
||||
arc->SetArcAngleAndEnd( EDA_ANGLE( *ewire.curve, DEGREES_T ), true );
|
||||
arc->SetArcAngleAndEnd( EDA_ANGLE( *ewire.curve * - 1, DEGREES_T ), true );
|
||||
arc->SetUnit( aGateNumber );
|
||||
|
||||
return arc;
|
||||
|
|
Loading…
Reference in New Issue