pcbnew: Restore missing pad size
After adjusting the pad size, we need to restore it when we short-circuit the drawing routine Fixes https://gitlab.com/kicad/code/kicad/issues/5702
This commit is contained in:
parent
7656663a2f
commit
4a86daa86d
|
@ -889,9 +889,15 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
||||||
{
|
{
|
||||||
const_cast<D_PAD*>( aPad )->SetSize( pad_size + margin + margin );
|
const_cast<D_PAD*>( aPad )->SetSize( pad_size + margin + margin );
|
||||||
margin.x = margin.y = 0;
|
margin.x = margin.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Once we change the size of the pad, check that there is still a pad remaining
|
// Once we change the size of the pad, check that there is still a pad remaining
|
||||||
if( !aPad->GetSize().x || !aPad->GetSize().y )
|
if( !aPad->GetSize().x || !aPad->GetSize().y )
|
||||||
|
{
|
||||||
|
// Reset the stored pad size
|
||||||
|
if( aPad->GetSize() != pad_size )
|
||||||
|
const_cast<D_PAD*>( aPad )->SetSize( pad_size );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue