diff --git a/eeschema/pin_type.h b/eeschema/pin_type.h index b437c1e7e9..a9184af69a 100644 --- a/eeschema/pin_type.h +++ b/eeschema/pin_type.h @@ -75,13 +75,11 @@ enum class GRAPHIC_PINSHAPE * The symbol library pin object orientations. */ enum class PIN_ORIENTATION { - PIN_RIGHT = 'R', - PIN_LEFT = 'L', - PIN_UP = 'U', - PIN_DOWN = 'D', - - LAST_OPTION = PIN_DOWN, - INHERIT = 'I' + PIN_RIGHT, + PIN_LEFT, + PIN_UP, + PIN_DOWN, + INHERIT }; diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index dc16f712aa..0ce00c7ce6 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -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 ) { + // 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( aPin->GetParentSymbol() ) ) + return; + if( !isUnitAndConversionShown( aPin ) ) return; diff --git a/eeschema/sch_pin.cpp b/eeschema/sch_pin.cpp index d274359ff9..ddd659624b 100644 --- a/eeschema/sch_pin.cpp +++ b/eeschema/sch_pin.cpp @@ -1486,19 +1486,6 @@ void SCH_PIN::Rotate( const VECTOR2I& aCenter, bool aRotateCCW ) if( dynamic_cast( GetParentSymbol() ) ) { 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 ); @@ -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; } } + 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; + } + } } }