From e14864b35c246111de91d90740f86bde2897de73 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 27 Oct 2021 01:43:38 +0100 Subject: [PATCH] Invert Y axis for pin root bounding box. Fixes https://gitlab.com/kicad/code/kicad/issues/9465 --- eeschema/lib_pin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index be7fe1762e..1355fc34e6 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -183,10 +183,10 @@ wxPoint LIB_PIN::GetPinRoot() const switch( m_orientation ) { default: - case PIN_RIGHT: return wxPoint( m_position.x + m_length, m_position.y ); - case PIN_LEFT: return wxPoint( m_position.x - m_length, m_position.y ); - case PIN_UP: return wxPoint( m_position.x, m_position.y - m_length ); - case PIN_DOWN: return wxPoint( m_position.x, m_position.y + m_length ); + case PIN_RIGHT: return wxPoint( m_position.x + m_length, -( m_position.y ) ); + case PIN_LEFT: return wxPoint( m_position.x - m_length, -( m_position.y ) ); + case PIN_UP: return wxPoint( m_position.x, -( m_position.y - m_length ) ); + case PIN_DOWN: return wxPoint( m_position.x, -( m_position.y + m_length ) ); } }