Honour pad offset when creating custom pad anchors (and polygons).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494
This commit is contained in:
parent
0f81dd3b5e
commit
300014177f
|
@ -873,8 +873,6 @@ std::vector<PCB_SHAPE*> PAD_TOOL::RecombinePad( PAD* aPad, bool aIsDryRun, BOARD
|
||||||
if( aPad->GetSizeX() > aPad->GetSizeY() )
|
if( aPad->GetSizeX() > aPad->GetSizeY() )
|
||||||
aPad->SetSizeX( aPad->GetSizeY() );
|
aPad->SetSizeX( aPad->GetSizeY() );
|
||||||
|
|
||||||
aPad->SetOffset( VECTOR2I( 0, 0 ) );
|
|
||||||
|
|
||||||
PCB_SHAPE* shape = new PCB_SHAPE( nullptr, SHAPE_T::POLY );
|
PCB_SHAPE* shape = new PCB_SHAPE( nullptr, SHAPE_T::POLY );
|
||||||
shape->SetFilled( true );
|
shape->SetFilled( true );
|
||||||
shape->SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::SOLID ) );
|
shape->SetStroke( STROKE_PARAMS( 0, PLOT_DASH_TYPE::SOLID ) );
|
||||||
|
@ -922,7 +920,9 @@ std::vector<PCB_SHAPE*> PAD_TOOL::RecombinePad( PAD* aPad, bool aIsDryRun, BOARD
|
||||||
primitive->SetBezierC2( fpShape->GetBezierC2() );
|
primitive->SetBezierC2( fpShape->GetBezierC2() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHAPE_T::POLY: primitive->SetPolyShape( fpShape->GetPolyShape() );
|
case SHAPE_T::POLY:
|
||||||
|
primitive->SetPolyShape( fpShape->GetPolyShape() );
|
||||||
|
primitive->Move( VECTOR2I( 0, 0 ) - aPad->GetOffset() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue