Eeschema Eagle Import: Set Pinshape. - modifies lin_pin.cpp function InternalPinDecoSize to default back to number text size if pin name text is set to zero.
This commit is contained in:
parent
08907d4fe8
commit
afaa2499dc
|
@ -130,7 +130,8 @@ static const wxString getPinOrientationName( unsigned aPinOrientationCode )
|
|||
|
||||
static int InternalPinDecoSize( const LIB_PIN &aPin )
|
||||
{
|
||||
return aPin.GetNameTextSize() / 2;
|
||||
|
||||
return aPin.GetNameTextSize() != 0 ? aPin.GetNameTextSize() / 2 : aPin.GetNumberTextSize() / 2;
|
||||
}
|
||||
|
||||
/// Utility for getting the size of the 'external' pin decorators (as a radius)
|
||||
|
|
|
@ -1693,6 +1693,28 @@ LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr< LIB_PART >& aPart, wxXmlNod
|
|||
*/
|
||||
}
|
||||
|
||||
if( epin->function)
|
||||
{
|
||||
wxString function = epin->function.Get();
|
||||
|
||||
if( function == "dot")
|
||||
{
|
||||
pin->SetShape(PINSHAPE_INVERTED);
|
||||
}
|
||||
else if( function == "dot")
|
||||
{
|
||||
pin->SetShape(PINSHAPE_CLOCK);
|
||||
}
|
||||
else if( function == "clk")
|
||||
{
|
||||
pin->SetShape(PINSHAPE_CLOCK);
|
||||
}
|
||||
else if( function == "dotclk")
|
||||
{
|
||||
pin->SetShape(PINSHAPE_INVERTED_CLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
return pin.release();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue