From 9c0e4cae7460f620aad1ea0ae092e58c633b03b2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 17 May 2019 08:34:25 +0200 Subject: [PATCH] Eeschema: fix incorrect position of fields of a hierarchical sheet when rotated (From master branch) Fixes: lp:1829048 https://bugs.launchpad.net/kicad/+bug/1829048 --- eeschema/sch_painter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 97900c7b8a..134dc40b66 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1305,7 +1305,7 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer ) double nameAngle = 0.0; if( aSheet->IsVerticalOrientation() ) - nameAngle = -M_PI/2; + nameAngle = M_PI/2; m_gal->SetStrokeColor( m_schSettings.GetLayerColor( LAYER_SHEETNAME ) ); @@ -1344,8 +1344,8 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer ) switch( sheetPin.GetEdge() ) { - case SCH_SHEET_PIN::SHEET_TOP_SIDE: offset_pos.y -= width / 2; break; - case SCH_SHEET_PIN::SHEET_BOTTOM_SIDE: offset_pos.y += width / 2; break; + case SCH_SHEET_PIN::SHEET_TOP_SIDE: offset_pos.y += width / 2; break; + case SCH_SHEET_PIN::SHEET_BOTTOM_SIDE: offset_pos.y -= width / 2; break; case SCH_SHEET_PIN::SHEET_RIGHT_SIDE: offset_pos.x -= width / 2; break; case SCH_SHEET_PIN::SHEET_LEFT_SIDE: offset_pos.x += width / 2; break; default: break;