diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index ddd998d720..e88be581ed 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1272,20 +1272,25 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer ) { if( !sheetPin.IsMoving() ) { + // For aesthetic reasons, the SHEET_PIN is drawn with a small offset + // of width / 2 int width = aSheet->GetPenSize(); - wxPoint pt = sheetPin.GetTextPos(); + wxPoint initial_pos = sheetPin.GetTextPos(); + wxPoint offset_pos = initial_pos; switch( sheetPin.GetEdge() ) { - case SCH_SHEET_PIN::SHEET_TOP_SIDE: pt.y -= width / 2; break; - case SCH_SHEET_PIN::SHEET_BOTTOM_SIDE: pt.y += width / 2; break; - case SCH_SHEET_PIN::SHEET_RIGHT_SIDE: pt.x -= width / 2; break; - case SCH_SHEET_PIN::SHEET_LEFT_SIDE: pt.x += 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; } - sheetPin.SetTextPos(pt); + sheetPin.SetTextPos( offset_pos ); draw( static_cast( &sheetPin ), aLayer ); + m_gal->DrawLine( offset_pos, initial_pos ); + sheetPin.SetTextPos( initial_pos ); } } }