From 07b4f88e6bae0de7011a856cf5107b092ec9aea9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 2 Jan 2023 16:52:08 +0100 Subject: [PATCH] Pcbnew: Fillet Lines tool does not set line width and layer. When fillet a polygon or a rect, the resulting lines and arcs had incorrect width and layer. Fixes #13338 https://gitlab.com/kicad/code/kicad/issues/13338 --- pcbnew/tools/edit_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index e3e4c78f93..24a625a6fe 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1089,6 +1089,8 @@ int EDIT_TOOL::FilletLines( const TOOL_EVENT& aEvent ) { std::vector pts; PCB_SHAPE *graphic = static_cast( item ); + PCB_LAYER_ID layer = graphic->GetLayer(); + int width = graphic->GetWidth(); if( graphic->GetShape() == SHAPE_T::RECT ) { @@ -1120,6 +1122,8 @@ int EDIT_TOOL::FilletLines( const TOOL_EVENT& aEvent ) line->SetStart( pts[jj - 1] ); line->SetEnd( pts[jj] ); + line->SetWidth( width ); + line->SetLayer( layer ); lines_to_add.insert( line ); } @@ -1134,6 +1138,8 @@ int EDIT_TOOL::FilletLines( const TOOL_EVENT& aEvent ) line->SetStart( pts.back() ); line->SetEnd( pts.front() ); + line->SetWidth( width ); + line->SetLayer( layer ); lines_to_add.insert( line ); } }