Fixes: lp:1639330 (Assertion failure opening libedit from eeschema in debug mode)
https://bugs.launchpad.net/kicad/+bug/1639330
This commit is contained in:
parent
c7fcb2695c
commit
3af551cef8
|
@ -1399,6 +1399,8 @@ void LIB_PIN::DrawPinElectricalTypeName( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
EDA_COLOR_T aColor, GR_DRAWMODE aDrawMode )
|
EDA_COLOR_T aColor, GR_DRAWMODE aDrawMode )
|
||||||
{
|
{
|
||||||
wxString etypeName = GetElectricalTypeName();
|
wxString etypeName = GetElectricalTypeName();
|
||||||
|
|
||||||
|
// Use a reasonable (small) size to draw the text
|
||||||
int etextSize = (m_nameTextSize*3)/4;
|
int etextSize = (m_nameTextSize*3)/4;
|
||||||
|
|
||||||
#define ETXT_MAX_SIZE Millimeter2iu(0.7 )
|
#define ETXT_MAX_SIZE Millimeter2iu(0.7 )
|
||||||
|
@ -1408,9 +1410,13 @@ void LIB_PIN::DrawPinElectricalTypeName( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
// Use a reasonable pen size to draw the text
|
// Use a reasonable pen size to draw the text
|
||||||
int pensize = etextSize/6;
|
int pensize = etextSize/6;
|
||||||
|
|
||||||
/* Get the num and name colors */
|
// Get a suitable color
|
||||||
if( (aColor < 0) && IsSelected() )
|
if( (aColor < 0) && IsSelected() )
|
||||||
aColor = GetItemSelectedColor();
|
aColor = GetItemSelectedColor();
|
||||||
|
else if( !IsVisible() )
|
||||||
|
aColor = GetInvisibleItemColor();
|
||||||
|
else
|
||||||
|
aColor = GetLayerColor( LAYER_NOTES );
|
||||||
|
|
||||||
wxPoint txtpos = aPosition;
|
wxPoint txtpos = aPosition;
|
||||||
int offset = Millimeter2iu( 0.4 );
|
int offset = Millimeter2iu( 0.4 );
|
||||||
|
@ -1489,9 +1495,9 @@ void LIB_PIN::PlotSymbol( PLOTTER* aPlotter, const wxPoint& aPosition, int aOrie
|
||||||
const int radius = ExternalPinDecoSize( *this );
|
const int radius = ExternalPinDecoSize( *this );
|
||||||
aPlotter->Circle( wxPoint( MapX1 * radius + x1,
|
aPlotter->Circle( wxPoint( MapX1 * radius + x1,
|
||||||
MapY1 * radius + y1 ),
|
MapY1 * radius + y1 ),
|
||||||
radius * 2, // diameter
|
radius * 2, // diameter
|
||||||
NO_FILL, // fill option
|
NO_FILL, // fill option
|
||||||
GetPenSize() ); // width
|
GetPenSize() ); // width
|
||||||
|
|
||||||
aPlotter->MoveTo( wxPoint( MapX1 * radius * 2 + x1,
|
aPlotter->MoveTo( wxPoint( MapX1 * radius * 2 + x1,
|
||||||
MapY1 * radius * 2 + y1 ) );
|
MapY1 * radius * 2 + y1 ) );
|
||||||
|
|
Loading…
Reference in New Issue