Eeschema: fix incorrect position of fields of a hierarchical sheet when rotated
Fixes: lp:1829048 https://bugs.launchpad.net/kicad/+bug/1829048
This commit is contained in:
parent
69339f341b
commit
0961614df2
|
@ -1291,7 +1291,7 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer )
|
||||||
double nameAngle = 0.0;
|
double nameAngle = 0.0;
|
||||||
|
|
||||||
if( aSheet->IsVerticalOrientation() )
|
if( aSheet->IsVerticalOrientation() )
|
||||||
nameAngle = -M_PI/2;
|
nameAngle = M_PI/2;
|
||||||
|
|
||||||
m_gal->SetStrokeColor( getRenderColor( aSheet, LAYER_SHEETNAME, false ) );
|
m_gal->SetStrokeColor( getRenderColor( aSheet, LAYER_SHEETNAME, false ) );
|
||||||
|
|
||||||
|
@ -1328,8 +1328,8 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer )
|
||||||
|
|
||||||
switch( sheetPin.GetEdge() )
|
switch( sheetPin.GetEdge() )
|
||||||
{
|
{
|
||||||
case SCH_SHEET_PIN::SHEET_TOP_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_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_RIGHT_SIDE: offset_pos.x -= width / 2; break;
|
||||||
case SCH_SHEET_PIN::SHEET_LEFT_SIDE: offset_pos.x += width / 2; break;
|
case SCH_SHEET_PIN::SHEET_LEFT_SIDE: offset_pos.x += width / 2; break;
|
||||||
default: break;
|
default: break;
|
||||||
|
|
Loading…
Reference in New Issue