Fix pin drawing after removal of upside-down coords.
This commit is contained in:
parent
67737ea0b2
commit
352463dfeb
|
@ -75,13 +75,11 @@ enum class GRAPHIC_PINSHAPE
|
||||||
* The symbol library pin object orientations.
|
* The symbol library pin object orientations.
|
||||||
*/
|
*/
|
||||||
enum class PIN_ORIENTATION {
|
enum class PIN_ORIENTATION {
|
||||||
PIN_RIGHT = 'R',
|
PIN_RIGHT,
|
||||||
PIN_LEFT = 'L',
|
PIN_LEFT,
|
||||||
PIN_UP = 'U',
|
PIN_UP,
|
||||||
PIN_DOWN = 'D',
|
PIN_DOWN,
|
||||||
|
INHERIT
|
||||||
LAST_OPTION = PIN_DOWN,
|
|
||||||
INHERIT = 'I'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -851,6 +851,11 @@ void SCH_PAINTER::drawPinDanglingIndicator( const VECTOR2I& aPos, const COLOR4D&
|
||||||
|
|
||||||
void SCH_PAINTER::draw( const SCH_PIN* aPin, int aLayer, bool aDimmed )
|
void SCH_PAINTER::draw( const SCH_PIN* aPin, int aLayer, bool aDimmed )
|
||||||
{
|
{
|
||||||
|
// Don't draw pins from a selection view-group. Pins in a schematic must always be drawn
|
||||||
|
// from their parent symbol's m_part.
|
||||||
|
if( dynamic_cast<const SCH_SYMBOL*>( aPin->GetParentSymbol() ) )
|
||||||
|
return;
|
||||||
|
|
||||||
if( !isUnitAndConversionShown( aPin ) )
|
if( !isUnitAndConversionShown( aPin ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1486,19 +1486,6 @@ void SCH_PIN::Rotate( const VECTOR2I& aCenter, bool aRotateCCW )
|
||||||
if( dynamic_cast<LIB_SYMBOL*>( GetParentSymbol() ) )
|
if( dynamic_cast<LIB_SYMBOL*>( GetParentSymbol() ) )
|
||||||
{
|
{
|
||||||
if( aRotateCCW )
|
if( aRotateCCW )
|
||||||
{
|
|
||||||
RotatePoint( m_position, aCenter, -ANGLE_90 );
|
|
||||||
|
|
||||||
switch( GetOrientation() )
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
case PIN_ORIENTATION::PIN_RIGHT: m_orientation = PIN_ORIENTATION::PIN_DOWN; break;
|
|
||||||
case PIN_ORIENTATION::PIN_UP: m_orientation = PIN_ORIENTATION::PIN_RIGHT; break;
|
|
||||||
case PIN_ORIENTATION::PIN_LEFT: m_orientation = PIN_ORIENTATION::PIN_UP; break;
|
|
||||||
case PIN_ORIENTATION::PIN_DOWN: m_orientation = PIN_ORIENTATION::PIN_LEFT; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
RotatePoint( m_position, aCenter, ANGLE_90 );
|
RotatePoint( m_position, aCenter, ANGLE_90 );
|
||||||
|
|
||||||
|
@ -1511,6 +1498,19 @@ void SCH_PIN::Rotate( const VECTOR2I& aCenter, bool aRotateCCW )
|
||||||
case PIN_ORIENTATION::PIN_DOWN: m_orientation = PIN_ORIENTATION::PIN_RIGHT; break;
|
case PIN_ORIENTATION::PIN_DOWN: m_orientation = PIN_ORIENTATION::PIN_RIGHT; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RotatePoint( m_position, aCenter, -ANGLE_90 );
|
||||||
|
|
||||||
|
switch( GetOrientation() )
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case PIN_ORIENTATION::PIN_RIGHT: m_orientation = PIN_ORIENTATION::PIN_DOWN; break;
|
||||||
|
case PIN_ORIENTATION::PIN_UP: m_orientation = PIN_ORIENTATION::PIN_RIGHT; break;
|
||||||
|
case PIN_ORIENTATION::PIN_LEFT: m_orientation = PIN_ORIENTATION::PIN_UP; break;
|
||||||
|
case PIN_ORIENTATION::PIN_DOWN: m_orientation = PIN_ORIENTATION::PIN_LEFT; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue