PnS, router/router_preview_item: fix incorrect size of SH_RECT shape when drawing it.
The width of the rectangle was used instead of the width of outline (usualy 0) to draw the shape (when dragging the pad for instance) Fixes #5944 https://gitlab.com/kicad/code/kicad/issues/5944
This commit is contained in:
parent
511bdb64e1
commit
c5f01501c1
|
@ -263,7 +263,6 @@ void ROUTER_PREVIEW_ITEM::drawShape( const SHAPE* aShape, KIGFX::GAL* gal ) cons
|
|||
case SH_RECT:
|
||||
{
|
||||
const SHAPE_RECT* r = (const SHAPE_RECT*) aShape;
|
||||
const int w = r->GetWidth();
|
||||
gal->SetFillColor( m_color );
|
||||
|
||||
if( m_clearance > 0 )
|
||||
|
@ -278,8 +277,8 @@ void ROUTER_PREVIEW_ITEM::drawShape( const SHAPE* aShape, KIGFX::GAL* gal ) cons
|
|||
}
|
||||
|
||||
gal->SetLayerDepth( m_depth );
|
||||
gal->SetIsStroke( w ? true : false );
|
||||
gal->SetLineWidth( w );
|
||||
gal->SetIsStroke( m_width ? true : false );
|
||||
gal->SetLineWidth( m_width);
|
||||
gal->SetStrokeColor( m_color );
|
||||
gal->DrawRectangle( r->GetPosition(), r->GetPosition() + r->GetSize() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue