Fix wrong rotation centre.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17135
This commit is contained in:
Jeff Young 2024-02-26 22:27:11 +00:00
parent ffa1d19216
commit 952c154422
1 changed files with 5 additions and 1 deletions

View File

@ -922,7 +922,11 @@ void PCB_IO_EAGLE::loadPlain( wxXmlNode* aGraphics )
zone->AppendCorner( VECTOR2I( kicad_x( r.x1 ), kicad_y( r.y2 ) ), outlineIdx );
if( r.rot )
zone->Rotate( zone->GetPosition(), EDA_ANGLE( r.rot->degrees, DEGREES_T ) );
{
VECTOR2I center( ( kicad_x( r.x1 ) + kicad_x( r.x2 ) ) / 2,
( kicad_y( r.y1 ) + kicad_y( r.y2 ) ) / 2 );
zone->Rotate( center, EDA_ANGLE( r.rot->degrees, DEGREES_T ) );
}
// this is not my fault:
zone->SetBorderDisplayStyle( outline_hatch, ZONE::GetDefaultHatchPitch(), true );