Don't leave a dummyPad in a group. Freeing it will cause problems.

Fixes https://gitlab.com/kicad/code/kicad/issues/13556
This commit is contained in:
Jeff Young 2023-01-16 17:30:03 +00:00
parent 3defb7679a
commit 22497502e6
1 changed files with 4 additions and 0 deletions

View File

@ -1329,6 +1329,10 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
return;
dummyPad.reset( static_cast<PAD*>( aPad->Duplicate() ) );
if( dummyPad->GetParentGroup() )
dummyPad->GetParentGroup()->RemoveItem( dummyPad.get() );
int initial_radius = dummyPad->GetRoundRectCornerRadius();
dummyPad->SetSize( pad_size + margin + margin );