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
This commit is contained in:
parent
40e41d0129
commit
07b4f88e6b
|
@ -1089,6 +1089,8 @@ int EDIT_TOOL::FilletLines( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
std::vector<VECTOR2I> pts;
|
||||
PCB_SHAPE *graphic = static_cast<PCB_SHAPE*>( 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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue