Move pinnumber above pins if pinnames aren't shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14998
This commit is contained in:
parent
3a301e50ae
commit
40fcfe891d
|
@ -1576,8 +1576,8 @@ void SCH_PAINTER::draw( const LIB_PIN* aPin, int aLayer, bool aDimmed )
|
||||||
colour [ABOVE] = getRenderColor( aPin, LAYER_PINNUM, drawingShadows, aDimmed );
|
colour [ABOVE] = getRenderColor( aPin, LAYER_PINNUM, drawingShadows, aDimmed );
|
||||||
text [ABOVE] = aPin->GetShownNumber();
|
text [ABOVE] = aPin->GetShownNumber();
|
||||||
}
|
}
|
||||||
// Otherwise pin NAMES go above and pin NUMBERS go below
|
// Otherwise if both are shown pin NAMES go above and pin NUMBERS go below
|
||||||
else
|
else if( showPinNames && showPinNumbers )
|
||||||
{
|
{
|
||||||
size [ABOVE] = showPinNames ? aPin->GetNameTextSize() : 0;
|
size [ABOVE] = showPinNames ? aPin->GetNameTextSize() : 0;
|
||||||
thickness[ABOVE] = nameStrokeWidth;
|
thickness[ABOVE] = nameStrokeWidth;
|
||||||
|
@ -1589,6 +1589,20 @@ void SCH_PAINTER::draw( const LIB_PIN* aPin, int aLayer, bool aDimmed )
|
||||||
colour [BELOW] = getRenderColor( aPin, LAYER_PINNUM, drawingShadows, aDimmed );
|
colour [BELOW] = getRenderColor( aPin, LAYER_PINNUM, drawingShadows, aDimmed );
|
||||||
text [BELOW] = aPin->GetShownNumber();
|
text [BELOW] = aPin->GetShownNumber();
|
||||||
}
|
}
|
||||||
|
else if( showPinNames )
|
||||||
|
{
|
||||||
|
size [ABOVE] = aPin->GetNameTextSize();
|
||||||
|
thickness[ABOVE] = nameStrokeWidth;
|
||||||
|
colour [ABOVE] = getRenderColor( aPin, LAYER_PINNAM, drawingShadows, aDimmed );
|
||||||
|
text [ABOVE] = aPin->GetShownName();
|
||||||
|
}
|
||||||
|
else if( showPinNumbers )
|
||||||
|
{
|
||||||
|
size [ABOVE] = aPin->GetNumberTextSize();
|
||||||
|
thickness[ABOVE] = numStrokeWidth;
|
||||||
|
colour [ABOVE] = getRenderColor( aPin, LAYER_PINNUM, drawingShadows, aDimmed );
|
||||||
|
text [ABOVE] = aPin->GetShownNumber();
|
||||||
|
}
|
||||||
|
|
||||||
if( m_schSettings.m_ShowPinsElectricalType )
|
if( m_schSettings.m_ShowPinsElectricalType )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue