Pcbnew: fix incorrect size of solder paste rectangular area of rect pads.
When the solder paste margin was the same for X and Y directions, the margin was not taken in account (missing code) Fixes #6621 https://gitlab.com/kicad/code/kicad/issues/6621
This commit is contained in:
parent
8781ce7efb
commit
63088e8bdb
|
@ -1025,9 +1025,15 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
|
|||
{
|
||||
const SHAPE_RECT* r = (SHAPE_RECT*) shape;
|
||||
|
||||
// At this point, if margin.x < 0 the actual rectangle size is
|
||||
// smaller than SHAPE_RECT r (the pad size was not modifed)
|
||||
if( margin.x < 0 )
|
||||
m_gal->DrawRectangle( r->GetPosition() - margin,
|
||||
r->GetPosition() + r->GetSize() + margin );
|
||||
else
|
||||
m_gal->DrawRectangle( r->GetPosition(), r->GetPosition() + r->GetSize() );
|
||||
|
||||
if( margin.x > 0 )
|
||||
if( margin.x > 0 ) // We draw a roudned rect shape
|
||||
{
|
||||
m_gal->DrawSegment( r->GetPosition(),
|
||||
r->GetPosition() + VECTOR2I( r->GetWidth(), 0 ),
|
||||
|
|
Loading…
Reference in New Issue