From c5f01501c1723aaf8e78b4c9d2a9a958030ae96b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 10 Oct 2020 10:03:23 +0200 Subject: [PATCH] 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 --- pcbnew/router/router_preview_item.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index da712007ca..ea4326bc64 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -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() );