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
This commit is contained in:
parent
deb387f54c
commit
9c0e4cae74
|
@ -1305,7 +1305,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( m_schSettings.GetLayerColor( LAYER_SHEETNAME ) );
|
m_gal->SetStrokeColor( m_schSettings.GetLayerColor( LAYER_SHEETNAME ) );
|
||||||
|
|
||||||
|
@ -1344,8 +1344,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